-Matt- Posted April 7, 2008 Posted April 7, 2008 Trying to fix me cron's having afew problem's Error: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/amazonba/public_html/cron_fivemins.php on line 26 Code: <?php include "config.php"; global $_CONFIG; if($_GET['code'] != $_CONFIG['code']) { die(""); } define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $set=array(); $settq=$db->query("SELECT * FROM settings"); while($r=$db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; } //brave update $query="UPDATE users SET brave=brave+((maxbrave/10)+0.5) WHERE brave<maxbrave "; $query2="UPDATE users SET brave=maxbrave WHERE brave>maxbrave"; $query3="UPDATE users SET hp=hp+(maxhp/3) WHERE hp<maxhp"; $query4="UPDATE users SET hp=maxhp WHERE hp>maxhp"; $query6"UPDATE users SET dexterity=dexterity+5 WHERE dexterity < max_dexterity"; $query7"UPDATE users SET dexterity=max_dexterity WHERE dexterity > max_dexterity"; $db->query($query); $db->query($query2); $db->query($query3); $db->query($query4); //enerwill update $query="UPDATE users SET energy=energy+(maxenergy/(12.5)) WHERE energy<maxenergy AND donatordays=0"; $query5="UPDATE users SET energy=energy+(maxenergy/(6)) WHERE energy<maxenergy AND donatordays>0"; $query2="UPDATE users SET energy=maxenergy WHERE energy>maxenergy"; $query3="UPDATE users SET will=will+10 WHERE will<maxwill"; $query4="UPDATE users SET will=maxwill WHERE will>maxwill"; $db->query($query6,$c) or die("\nError Executing Query 6 for updating users $i to $next\n$query6\n".$db->error()."\nError Code:".$db->errno()); $db->query($query7,$c) or die("\nError Executing Query 7 for updating users $i to $next\n$query7\n".$db->error()."\nError Code:".$db->errno()); $db->query($query); $db->query($query5); $db->query($query2); $db->query($query3); $db->query($query4); if($set['validate_period'] == 5 && $set['validate_on']) { $db->query("UPDATE users SET verified=0"); } if($set['validate_period'] == 15 && $set['validate_on'] && in_array(date('i'),array("00", "15", "30", "45"))) { $db->query("UPDATE users SET verified=0"); } ?> Please try and help . . . Quote
Guest Anonymous Posted April 7, 2008 Posted April 7, 2008 Re: Crons Error $query6"UPDATE users SET dexterity=dexterity+5 WHERE dexterity < max_dexterity"; should be $query6="UPDATE users SET dexterity=dexterity+5 WHERE dexterity < max_dexterity"; Get yourself a good syntax highlighting editor - like EditPlus - it helps you to spot these mistakes. References: http://www.editplus.com/ Quote
KDawg08 Posted April 7, 2008 Posted April 7, 2008 Re: Crons Error Nyna you have some wonderful suggestions all over the place, What programs do you suggest over all? Like... Personal favorites? Quote
-Matt- Posted April 7, 2008 Author Posted April 7, 2008 Re: Crons Error Thanks for the tip on the program i wil get this. Quote
Guest Anonymous Posted April 7, 2008 Posted April 7, 2008 Re: Crons Error Nyna you have some wonderful suggestions all over the place, What programs do you suggest over all? Like... Personal favorites? The PHP/MySQL support staff: mdshare, myself and a few others will hopefully have a few more FAQs on that very subject - i.e. what tools *we* use as professional programmers. 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.