carlg Posted November 8, 2007 Posted November 8, 2007 I keep on getting Fatal error: Call to a member function query() on a non-object When i trying to convert to v2. this is what it was $q=mysql_query("SELECT * FROM validating WHERE vdID='{$_GET['token']}'", $c); and i changed to This code . $q=$db->query("SELECT * FROM validating WHERE vdID='{$_GET['token']}'", $c); What have i done wrong? Quote
Zeggy Posted November 8, 2007 Posted November 8, 2007 Re: Fatal error: help please Well, why would you change it to $db->query? You'd only do that if you were using a library such as ADOdb that would connect to the database for you. Otherwise, just stick with the normal mySQL functions from PHP. Call to a member function query() on a non-object Basically, that's saying $db isn't an object, so you can't run the query() function. Most likely, this is happening because: * $db doesn't exist * or query is wrong Quote
dementor Posted November 8, 2007 Posted November 8, 2007 Re: Fatal error: help please whateva mod it is run the the Sqls first Quote
carlg Posted November 8, 2007 Author Posted November 8, 2007 Re: Fatal error: help please ok i hve changed it back to mysql_ now i get Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.