Fatal error: Call to a member function row() on a non-object |
[eluser]BrandonDurham[/eluser]
Why would this be happening here? Code: $sql = "UPDATE prizes SET Quote:Fatal error: Call to a member function row() on a non-object in /Users/Deefee/Documents/Sites/073MHG232/system/application/models/db_functions.php on line 88Line 88 is $row = $query->row();.
[eluser]BrandonDurham[/eluser]
Here's the query it's spitting out: Code: UPDATE prizes SET email = '[email protected]', fname = 'Brandon', lname = 'Durham', address1 = '5300 Bee Caves Road', address2 = '17305 E Darleen', city = 'Austin', state = 'AK', zip = '78745', date_submitted = '2007-08-25 18:35:26', opt_in = 'Yes', company = 'Kolar Advertising', day_phone = '(123) 123-1231', evening_phone = '(555) 555-5555' WHERE id = '8'
[eluser]NemetraL[/eluser]
Any issue with your SQL code? Try a var_dump() on the $query variable..
[eluser]glemigh[/eluser]
Can you issue a similar MySQL statment in phpMyAdmin or like tool? George
[eluser]BrandonDurham[/eluser]
It works fine if I use that same query directly in PHPMyAdmin's SQL window.
[eluser]Michael Wales[/eluser]
Is the database library being included? I would assume so, since db->query didn't issue the error.
[eluser]NemetraL[/eluser]
Post the var_dump() so that we can see what's inside.. ;-)
[eluser]BrandonDurham[/eluser]
I'm an idiot. That query used to be an insert and is now an update. That's why it's not returning any rows. Sorry for not catching that sooner. Thanks for the help.
[eluser]glemigh[/eluser]
I thought of that this morning, apparently sleep helps, glad you were able to discover the problem. George |
Welcome Guest, Not a member yet? Register Sign In |