Raised This Month: $ Target: $400
 0% 

sql results


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
yoni279
Member
Join Date: Feb 2010
Old 01-20-2014 , 14:33   sql results
Reply With Quote #1

hey i'm doing this:
copy(g_Cache,511,"SELECT ip FROM mods WHERE ID = 1")
SQL_ThreadQuery(g_SqlTuple,"SelectHandle",g_C ache)
and the results i get its:
10
and in the table its: 10.0.0.1:27015
thats is the public

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
    
while(SQL_MoreResults(Query))
    {
        
DataNum SQL_ReadResult(Query,0)
        
ColorChat(0NORMAL"%d"DataNum)
        
SQL_NextRow(Query)
    }
   
    return 
PLUGIN_CONTINUE

how can i do i get all the ip?
10.0.0.1:27015?
yoni279 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