[PHP-DB] Executing SQL query with ODBC

2004-11-09 Thread Petrus Ali Saputra
Here is my code: $conn = odbc_connect(Ta Fara,,); $query = SELECT * FROM Config; $result = odbc_exec($conn, $query); echo odbc_num_rows($result); This code never give me a 0 result even there is some data. How can I solve it? Thank you. -- Petrus Ali Saputra

Re: [PHP-DB] Executing SQL query with ODBC

2004-11-09 Thread Simon Rees
Hi Most databases don't return the number of rows in the results of a select statement to odbc_num_rows. See: http://www.php.net/manual/en/function.odbc-num-rows.php Usually the way to determine the number of rows a select returns is to either fetch them all and count them or do an additional