Jump to content
MakeWebGames

Recommended Posts

Posted

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?

Posted

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

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...