• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
num_rows not working in ODBC Multiple DB object

#2
One more problem
I found that if I just use $query->result(), I can get the result normally with both connection

but once I use $query->num_rows() in object $main_db
the $query will turn All Null

for example,
$query = $main_db->query($sql);
foreach ($query->result() as $row)
{
echo $row->a.",";
}
echo "<br/>";

$query = $main_db->query($sql);
echo $query->num_rows();
foreach ($query->result() as $row)
{
echo $row->a.",";
}


and result would be:
a,b,c,d,e,f,g,h,i,j,
0
^(this line supposed to run foreach too but nothing)
Reply


Messages In This Thread
RE: num_rows not working in ODBC Multiple DB object - by judaskit - 02-25-2016, 11:45 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.