Jul 26, 2008

Help With Php/mysql

Free Web Hosting, No Ads > CONTRIBUTE > The Internet > Website Discussion

free web hosting

Help With Php/mysql

tdktank59
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:
IPB Image

drugringwars:
IPB Image

 

 

 


Reply

hts
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?

Reply

tdktank59
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...

Reply

tdktank59
found the problem thanks for those who tried to help me

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : php mysql

  1. Guys Need Help With Mysql Please - (1)
  2. Need Help With Offsite Mysql Databases - (2)
    I was just wondering, is it possible at all to get an ip that allows a gameserver to connect to it
    and access its MySQL dbs?...



Looking for php, mysql

Searching Video's for php, mysql
advertisement



Help With Php/mysql



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE