|
Posted by nescio on 01/26/06 12:06
i have to use odbc to connect to a access database.
i want to use a function like mysl_num_rows() to count the rows in the
result set;
according to the manual i have to use odbc_num_rows();
but when i use odbc_num_rows() i always get as a result: -1;
no matter how many rows i see, so the connection and query is correct;
i see lets say 50 rows as a result but odbc_num_rows() still gives -1, and
not 50 as i expected.
and if the query has no result set i also get -1
is odbc_num_rows() not the same as mysql_num_rows()? and if not, how do i
get the amount of
rows in the result set (because the application has to stop if the result
set is empty);
---------------source code ----------------
$connection = odbc_connect('x','x','x');
$query = $query_a;
$result = odbc_do($connection,$query);
$aantal = odbc_num_rows($result);
$aantal is always -1!!
------------------------------------------
thanks
Navigation:
[Reply to this message]
|