Welcome Guest, Not a member yet? Register   Sign In
num_rows not work on object
#3

[eluser]RJ[/eluser]
Code:
$query = $TT->query("SELECT devicetype, TO_CHAR(subversion) FROM ttdevice WHERE msisdn = '".$this->MSISDN."' AND unitid = '".$this->UNITID."'");

This is the query; if you leave out the num_rows check and dump $rows you get:
Quote:stdClass Object ( [DEVICETYPE] => 1 [TO_CHAR(SUBVERSION)] => 0 )

NUM_ROWS produces a result of -1. So based on the foreach in the beginning of this post, I can not have a check on $query. I think num_rows doesn't work because its not a row, i'm getting back objects; but the user guide said the num_rows check should work... and doesn't.

Does that makes sense?


Messages In This Thread
num_rows not work on object - by El Forum - 04-17-2009, 02:40 PM
num_rows not work on object - by El Forum - 04-17-2009, 03:54 PM
num_rows not work on object - by El Forum - 04-17-2009, 04:02 PM
num_rows not work on object - by El Forum - 04-17-2009, 04:11 PM
num_rows not work on object - by El Forum - 04-17-2009, 04:18 PM
num_rows not work on object - by El Forum - 04-17-2009, 04:46 PM



Theme © iAndrew 2016 - Forum software by © MyBB