Jump to content
MakeWebGames

Cron MYSQL Link Problem.


DesignLoft
 Share

Recommended Posts

I have finally sorted out the "Access Denied" problem relating to the MYSQL login. Now the problem is the mysql links. As an example this is hospital.php, ( the error is happening with all the cron php's)

Error:

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /usr/home/ben/public_html/mafia/SuPerdupercronSZ/are/not/4u/hospital.php on line 5

 

the line is:

mysql_query("UPDATE users set hospital=hospital-1 WHERE hospital>0",$c);

 

any ideas how to sort this out? :?

Link to comment
Share on other sites

Re: Cron MYSQL Link Problem.

did you include the mysql.php page?

the ,$c part is optional anyway, its not needed for the query to run. without it, it just uses the last connection opened with mysql_connect(). and since its a warning, it generally doesn't do much to interfere with the running of the script

also, im pretty sure you don't need global $c anywhere, except inside functions.

Link to comment
Share on other sites

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.

 Share

×
×
  • Create New...