grlayouts Posted March 3, 2007 Share Posted March 3, 2007 ok i must be missing why this isnt paying out? <? include('config.php'); error_reporting(E_ALL) ; ini_set('display_errors', 1); $drugpayout = 300 mysql_query('UPDATE `players` SET `drugs` = `drugs` + (`drugfact` * '300'), `dpayout` = (`drugfact` * '300')'); ?> Quote Link to comment Share on other sites More sharing options...
genericnumber1 Posted March 3, 2007 Share Posted March 3, 2007 missing a semicolon $drugpayout = 300; Quote Link to comment Share on other sites More sharing options...
grlayouts Posted March 3, 2007 Author Share Posted March 3, 2007 im not even using that. lol! Quote Link to comment Share on other sites More sharing options...
genericnumber1 Posted March 3, 2007 Share Posted March 3, 2007 doesn't mean your syntax was right Quote Link to comment Share on other sites More sharing options...
grlayouts Posted March 3, 2007 Author Share Posted March 3, 2007 true.. but it still aint paying out. Quote Link to comment Share on other sites More sharing options...
LazyJones Posted March 3, 2007 Share Posted March 3, 2007 whole query is pretty much f*cked up, the amount of single quotes is hurting my eyes I think you are looking something like this (I persume $drugfact is variable, what else could it possibly be) "UPDATE players SET drugs = drugs + $drugfact*300, dpayout = $drugfact*300" You don't need single quotes unless you are working with varchars and alike Quote Link to comment Share on other sites More sharing options...
grlayouts Posted March 3, 2007 Author Share Posted March 3, 2007 even that ain't working the database ain't updating. Quote Link to comment Share on other sites More sharing options...
grlayouts Posted March 3, 2007 Author Share Posted March 3, 2007 oh im an idiot.. i got it. cheers. Quote Link to comment Share on other sites More sharing options...
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.