AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Set SQL Selects to variables (https://forums.alliedmods.net/showthread.php?t=16835)

mysticssjgoku4 08-21-2005 07:30

Set SQL Selects to variables
 
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 08-21-2005 09:32

NVRM I figured it out.


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

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