Welcome Guest, Not a member yet? Register   Sign In
num_rows not working in ODBC Multiple DB object
#1

I use ODBC DB
I found that I cannot use num_rows when it is a database object
For example:
$this->load->database('testing');
$sql = "SELECT top 10 * from [haha].[dbo].[Info]";

$query = $this->db->query($sql);
echo "1.";
echo $query->num_rows();
echo "<hr/>";


$main_db = $this->load->database('testing',true);
$query = $main_db->query($sql);
echo "2.";
echo $query->num_rows();
echo "<hr/>";

And the result would be:
1.10

2.0



Is it a CI bug or someone can give me some advice to fix it?
Reply


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



Theme © iAndrew 2016 - Forum software by © MyBB