|
|
|
|
![]() ![]() |
Nov 3 2006, 07:38 AM
Post
#1
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 398 Joined: 21-June 05 From: Callifornia Member No.: 8,519 |
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 CODE $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: ![]() drugringwars: ![]() |
|
|
|
Nov 3 2006, 02:02 PM
Post
#2
|
|
|
Advanced Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 138 Joined: 30-September 06 From: Iasi, Romania Member No.: 30,851 |
QUOTE $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? |
|
|
|
Nov 3 2006, 03:06 PM
Post
#3
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 398 Joined: 21-June 05 From: Callifornia Member No.: 8,519 |
yeah i know lol i cant figure out what to do... i just kept messing with the code till i normaly get it to work...
|
|
|
|
Nov 4 2006, 01:06 AM
Post
#4
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 398 Joined: 21-June 05 From: Callifornia Member No.: 8,519 |
found the problem thanks for those who tried to help me
|
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 12th October 2008 - 03:10 AM |