chavdave Posted June 8, 2012 Posted June 8, 2012 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 Quote
KyleMassacre Posted June 8, 2012 Posted June 8, 2012 It means you dont have a restore column in the usrers table Quote
chavdave Posted June 8, 2012 Author Posted June 8, 2012 ok am still learning lol how do i add it to myphpadmin coz i dont seem to have a cron file in there Quote
skooda Posted June 8, 2012 Posted June 8, 2012 Go to the cron day file file and delete the line that has restore in it Quote
chavdave Posted June 8, 2012 Author Posted June 8, 2012 (edited) come on gtalk skooda this line $db->query("UPDATE `users` SET `restore`='0'"); Deleted it Edited June 8, 2012 by chavdave Quote
rulerofzu Posted June 8, 2012 Posted June 8, 2012 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? Quote
Uridium Posted June 8, 2012 Posted June 8, 2012 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 // Quote
skooda Posted June 8, 2012 Posted June 8, 2012 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.:) Quote
rulerofzu Posted June 8, 2012 Posted June 8, 2012 Skooda lets face it you didnt think at all. The question is...why is that in your cron? How come you dont know what it does as its not there by default. In which case where did you get the codes from and is there any other file using restore. Quote
KyleMassacre Posted June 8, 2012 Posted June 8, 2012 (edited) 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 June 8, 2012 by KyleMassacre Quote
chavdave Posted June 9, 2012 Author Posted June 9, 2012 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 Quote
KyleMassacre Posted June 9, 2012 Posted June 9, 2012 ok am still learning lol how do i add it to myphpadmin coz i dont seem to have a cron file in there You'll eventually learn it, im still learning and am far from being good at this ;) 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.