Raised This Month: $ Target: $400
 0% 

sql results


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
kasu007
Junior Member
Join Date: Jan 2013
Old 01-21-2014 , 05:05   Re: sql results
Reply With Quote #2

Well 1st your problem is,
1) your variable is integer
2) your reading datanum as you read "integer"
3) your outputing your variable as integer aswell

but you should be doing as string

PHP Code:
public SelectHandle(FailState,Handle:Query,Error[],Errcode,Data[],DataSize)
{
    if(
FailState == TQUERY_CONNECT_FAILED)
        return 
set_fail_state("Could not connect to SQL database.")
    else if(
FailState == TQUERY_QUERY_FAILED)
        return 
set_fail_state("Query failed.")
   
    if(
Errcode)
        return 
log_amx("Error on query: %s",Error)
   
    new 
DataNum[32]
    while(
SQL_MoreResults(Query))
    {
        
SQL_ReadResult(Query0DataNum31)
        
ColorChat(0NORMAL"%s"DataNum)
        
SQL_NextRow(Query)
    }
   
    return 
PLUGIN_CONTINUE

this should work
kasu007 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 10:11.


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