gamesmstr Posted September 18, 2008 Share Posted September 18, 2008 Ok. This is driving me crazy. Something in this section is giving me an error. The offending line is supposedly the red line. if ($gold > 0){ $tradeacct=mysql_query("select * from tradeaccount where id = '$sendid'"); $tradeamt = mysql_fetch_array($tradeacct); if (!$tradeamt[id]){ mysql_query("insert into tradeaccount (id,gold) values ('$sendid','$gold')"); } else { mysql query("update tradeaccount set gold=gold+$gold where id='$sendid'"); } } Now what is strange is that the line below this works perfectly. mysql_query("update userdb set gold=gold+$gold, rkeys=rkeys+$rkeys, hacks=hacks+$mythril, elixir=elixir+$elixir, npccreds=npccreds+$npccreds,emblems=emblems+$emblems, syphon=syphon+$syphon, nectar=nectar+$nectar where id='$sendid'"); Link to comment https://forums.phpfreaks.com/topic/124827-solved-parse-error-syntax-error-unexpected-t_string/ Share on other sites More sharing options...
Mchl Posted September 18, 2008 Share Posted September 18, 2008 It's mysql_query not mysql query Link to comment https://forums.phpfreaks.com/topic/124827-solved-parse-error-syntax-error-unexpected-t_string/#findComment-644850 Share on other sites More sharing options...
gamesmstr Posted September 18, 2008 Author Share Posted September 18, 2008 *Doh! Thanks. Link to comment https://forums.phpfreaks.com/topic/124827-solved-parse-error-syntax-error-unexpected-t_string/#findComment-644859 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.