Jump to content
MakeWebGames

having trouble with daily crons


chavdave
 Share

Recommended Posts

could someone point me in the right direction i have all my cron jobs working except my daily cron i keep getting this error

% Total % Received % Xferd Average Speed Time Time Time Current

Dload Upload Total Spent Left Speed

100 114 0 114 0 0 114 0 --:--:-- --:--:-- --:--:-- 114

100 114 0 114 0 0 114 0 --:--:-- --:--:-- --:--:-- 0

<b>QUERY ERROR:</b> Unknown column 'restore' in 'field list'<br />

Query was UPDATE `users` SET `restore`='0'

can someone tell me what am doing wrong ?

Thanks

Link to comment
Share on other sites

chavdave change

$db->query("UPDATE `users` SET `restore`='0'");

to

//$db->query("UPDATE `users` SET `restore`='0'");

 

make sure the // is at the beginning it just renderes that one line as inoperable so it wont run to make it run again just delete the //

Link to comment
Share on other sites

Seriously so on the word of some other noob skooda you deleted the query.

Did you even know what the query did before you deleted it?

Well I didn't have think hard to learn what unknown mean.Besides everyone start as a noob I learn something new everyday.:)

Link to comment
Share on other sites

Instead of deleting stuff do as illusions said if your unsure what the line of code does also if its a bunch of lines you would like to delete just do a /* and end it with this *\ like this:

/*this is the start of a query or code
More
More 
More
End of the query or code
*/

Now, to add the column go to phpmyadmin then got to SQL at the top and paste this line and run it:

ALTER TABLE `users` ADD `restore` INT( 11 ) NOT NULL DEFAULT 0;

PS please dont knock me on the INT value, its what im used to and im still trying to under stand those values as well and im sure changing it to 1 or using tinyint would work just fine

Edited by KyleMassacre
Link to comment
Share on other sites

Instead of deleting stuff do as illusions said if your unsure what the line of code does also if its a bunch of lines you would like to delete just do a /* and end it with this *\ like this:
/*this is the start of a query or code
More
More 
More
End of the query or code
*/

Now, to add the column go to phpmyadmin then got to SQL at the top and paste this line and run it:

ALTER TABLE `users` ADD `restore` INT( 11 ) NOT NULL DEFAULT 0;

PS please dont knock me on the INT value, its what im used to and im still trying to under stand those values as well and im sure changing it to 1 or using tinyint would work just fine

 

All my Cron's are working fine now :)

Thanks

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...