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')'); ?> Link to comment https://forums.phpfreaks.com/topic/41040-simple/ Share on other sites More sharing options...
genericnumber1 Posted March 3, 2007 Share Posted March 3, 2007 missing a semicolon $drugpayout = 300; Link to comment https://forums.phpfreaks.com/topic/41040-simple/#findComment-198732 Share on other sites More sharing options...
grlayouts Posted March 3, 2007 Author Share Posted March 3, 2007 im not even using that. lol! Link to comment https://forums.phpfreaks.com/topic/41040-simple/#findComment-198733 Share on other sites More sharing options...
genericnumber1 Posted March 3, 2007 Share Posted March 3, 2007 doesn't mean your syntax was right Link to comment https://forums.phpfreaks.com/topic/41040-simple/#findComment-198735 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. Link to comment https://forums.phpfreaks.com/topic/41040-simple/#findComment-198736 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 Link to comment https://forums.phpfreaks.com/topic/41040-simple/#findComment-198753 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. Link to comment https://forums.phpfreaks.com/topic/41040-simple/#findComment-198766 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. Link to comment https://forums.phpfreaks.com/topic/41040-simple/#findComment-198770 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.