Raised This Month: $ Target: $400
 0% 

Reading data with SQLx


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ghostdlr
Senior Member
Join Date: Aug 2010
Old 08-23-2010 , 15:29   Reading data with SQLx
Reply With Quote #1

How can I read data from a particular column with SQLx (the query returns only one row) ?
ghostdlr is offline
minato
Senior Member
Join Date: May 2010
Location: Rosario
Old 08-23-2010 , 15:31   Re: Reading data with SQLx
Reply With Quote #2

SQL_ReadResult(query,col)
__________________
minato is offline
Send a message via MSN to minato
ghostdlr
Senior Member
Join Date: Aug 2010
Old 08-23-2010 , 15:42   Re: Reading data with SQLx
Reply With Quote #3

I've tried this already :
new Data
Data = SQL_ReadResult(Query, 0)
server_print("Value: %s",Data)

It prints out integers (%d) but I don't know how to do this for strings
%s is for strings in amxmodx, right ?

Last edited by ghostdlr; 08-23-2010 at 15:45.
ghostdlr is offline
minato
Senior Member
Join Date: May 2010
Location: Rosario
Old 08-23-2010 , 16:10   Re: Reading data with SQLx
Reply With Quote #4

PHP Code:
new szBuffer[32]
SQL_ReadResult(query,0,szBuffer,sizeof(szBuffer) - 1)
server_print("Value: %s",szBuffer
__________________
minato is offline
Send a message via MSN to minato
ghostdlr
Senior Member
Join Date: Aug 2010
Old 08-23-2010 , 16:18   Re: Reading data with SQLx
Reply With Quote #5

It works. Thanks .
ghostdlr is offline
Reply


Thread Tools
Display Modes

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 21:55.


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