Jump to content
xisto Community
tdktank59

Help With Php/mysql

Recommended Posts

Hey im working on a scrip that charges a "cartel" for being at war with another "cartel" and i cant seem to get this to work just right...

 

heres what i have so far

 

$cartel = mysql_query("SELECT drugringID FROM drugringwars WHERE drugringID = {$declarer['warDECLARER']} ");while ($ids = mysql_fetch_array($cartel))	{	echo "cartel {$ids['drugringID']} has been charged for being at war with another cartel";	$cost = 1000000 * (rand(1,10));	mysql_query("UPDATE drugrings SET drugringdough=drugringdough-{$cost} WHERE drugringID={$ids['drugringID']}  ");	echo "</br>";		}

 

and these few things may help a bit when trying to help me...

the stuff in the while {} works fine just cant get an id from the db so heres a few things

 

drugrings:

Posted Image

 

drugringwars:

Posted Image

Share this post


Link to post
Share on other sites

$cartel = mysql_query("SELECT drugringID FROM drugringwars WHERE drugringID = {$declarer['warDECLARER']} ");

 


what is the point of getting the value of a mysql field which you already know?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.