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

[eluser]RJ[/eluser]
This is an ODBC query, the value of $query is:
Quote:CI_DB_odbc_result Object ( [conn_id] => Resource id #123 [result_id] => Resource id #124 [result_array] => Array ( ) [result_object] => Array ( ) [current_row] => 0 [num_rows] => -1 [row_data] => )

The query being ran is:
Code:
SELECT devicetype, subversion
FROM (ttdevice)
WHERE msisdn = ‘xxxx'
AND unitid = ‘xxxx’

I can get the data out now running the foreach without num_row check; num_row doesn't recognize the result above as a row thereby returning value of -1. There has to be a different check or maybe pull the data out as an array and check?


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