good odbc tutorial - Programmers Heaven

Howdy, Stranger!

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

Categories

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?

Comments

  • treshrtreshr Posts: 326Member
    [code]
    $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
    }
    [/code]

    Hope this helps you a bit. Otherwise go to this url: http://dev.mysql.com/tech-resources/articles/ddws/index.html

    Good luck.


    --=][tReShR][=--

  • 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.