Currently, i'm doing a project using php5 ODBC with DSN..develop system in Window platform..
when i try transfer all my scripts to linux platform..i can't get the result from my SQL query statement:
example:
$query="SELECT * FROM table WHERE....";
$result=odbc_exec($conn,$query);
$numRows=odbc_num_rows($result);
if($numRows>0)
{
while( odbc_fetch_row($result))
{
//fetch from table
echo "wat i fetched...";
}
}
else
{
echo "query failed!";
}
in window platform, it's fine..but when come to linux platform..i got query failed.
after spent times to debug, found i just got the result after remark/comment my $numRows...
what i wish to know..is it odbc_num_rows function is not for linux platform??
somone can gives me feedback?Thanks!!! 🙂