object(CI_DB_mysql_result)#22 (7) { ["conn_id"]=>.... |
[eluser]phpmonster[/eluser]
I am able to insert into the database but when I query the database with: Code: $query['results'] = $this->db->query('SELECT * FROM products'); I get: Quote:object(CI_DB_mysql_result)#22 (7) { ["conn_id"]=> resource(32) of type (mysql link persistent) ["result_id"]=> resource(49) of type (mysql result) ["result_array"]=> array(0) { } ["result_object"]=> array(0) { } ["current_row"]=> int(0) ["num_rows"]=> int(2) ["row_data"]=> NULL }
[eluser]sooner[/eluser]
look at this http://ellislab.com/codeigniter/user-gui...sults.html. i think you need to use result $query = $this->db->query('SELECT * FROM products'); $query['results']=$query->result();
[eluser]phpmonster[/eluser]
[quote author="sooner" date="1293159025"]look at this http://ellislab.com/codeigniter/user-gui...sults.html. i think you need to use result $query = $this->db->query('SELECT * FROM products'); $query['results']=$query->result();[/quote] Thanks for your reply; I just tried that and I get the exact same error. I don't understand, it's a clean install with ion auth installed. Inserting into the db works but querying it gets the message above.
[eluser]sooner[/eluser]
for me it doesn't seem like an error.But i am not sure.May be some one would help.
[eluser]Federico BaƱa[/eluser]
you're doing var_dump on the query object, as @sooner said, you need to get the result from it. Code: $query = $this->db->query(...);
[eluser]phpmonster[/eluser]
That did it - I was goofing up ... and indeed I had a var_dump() line I removed as well. Thanks for your help. |
Welcome Guest, Not a member yet? Register Sign In |