Raised This Month: $ Target: $400
 0% 

Set SQL Selects to variables


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 08-21-2005 , 07:30   Set SQL Selects to variables
Reply With Quote #1

I want to set some variables like
new ammo, clip, gunid
to the results of which are obtained by an sql query.

So for example, I do the query.

Code:
dbi_query(Sql:dbc,"SELECT `plr_weapons`.`ammo`=ammo, `plr_weapons`.`clip`=clip, `plr_weapons`.`mode`=mode, `plr_weapons`.`extra`=extra FROM `plr_weapons` WHERE SteamID='$s'", authid)

plr_weapons is the table
ammo, clip, mode, extra are the colums in that table.

I want to extract the numbers from the sql, and set them as the variables
Code:
new ammo, clip, mode, extra

As you can see, I tried from the above, but it doesn't work .

Thanks.
__________________

mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:24.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode