Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID


We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

good odbc tutorial

CrushCrush Posts: 43Member
could smbdy please tell where to find a good php odbc tutorial? i cant find any :(
and also some place where asp and php functions and other stuff are compared... like a table with asp on the left and php on the right.
i used to be an asp programmer and i cant find the php solutions for different problems.
f.ex. the rs.eof. how to check whether the query has returned results in php?


  • treshrtreshr Posts: 326Member
    $dbcnx = @mysql_connect("localhost", "root", "mypasswd"); // connect to the database
    $query = "SELECT * FROM contacts"; // setting up the query
    $results = mysql_query($query); // execute the query and get the results
    $rows = mysql_num_rows($results); // count the rows
    // start a while loop with getting the first result and put it in the variable $result
    while ( $result = mysql_fetch_array($results) ) {
    // process your results

    Hope this helps you a bit. Otherwise go to this url:

    Good luck.


  • CrushCrush Posts: 43Member
    : $rows = mysql_num_rows($results); // count the rows

    tkank you for the tip, but is there an odbc function for this?
    the odbc_count_rows or smth did not work...
Sign In or Register to comment.