Raised This Month: $ Target: $400
 0% 

SQL - Get multiple data from a single query


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
noodleboy347
AlliedModders Donor
Join Date: Mar 2009
Old 01-26-2011 , 00:47   Re: SQL - Get multiple data from a single query
Reply With Quote #5

Quote:
Originally Posted by berni View Post
Or use SMLIB, it has some functions for reading data by column names:

http://forums.alliedmods.net/showthr...93#post1398793

Code:
stock SQL_FetchIntByName(Handle:query,  String:fieldName[],  &DBResult:result=DBVal_Error);
stock bool:SQL_FetchBoolByName(Handle:query,  String:fieldName[],  &DBResult:result=DBVal_Error);
stock Float:SQL_FetchFloatByName(Handle:query,  String:fieldName[],  &DBResult:result=DBVal_Error);
stock SQL_FetchStringByName(Handle:query,  String:fieldName[],  String:buffer[],  maxlength,  &DBResult:result=DBVal_Error); 
This is great, thanks
noodleboy347 is offline
 



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 04:05.


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