Raised This Month: $ Target: $400
 0% 

Query, select from mysql help me...


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Viera
Senior Member
Join Date: Sep 2008
Location: Poland
Old 02-27-2009 , 20:25   Query, select from mysql help me...
Reply With Quote #1

Hi all, I wanna do select in to this plugin.
in line 78 I write querry
PHP Code:
format(query_select,1000,"SELECT tmpNick FROM `%s`, table"
But it dosn't work..
Can you help me, please...

PHP Code:
public client_connect(id)
{
    new 
ip[16],ip1[16],ip2[16],ip3[16],ip4[16]
    new 
ipA[16],ipB[16],a1[16],a2[16],a3[16],a4[16],b1[16],b2[16],b3[16],b4[16]
    new 
czas[20],a,index,i,plik[100],len,nieban,c
    
new tmp[100],aq1,aq2,aq3,aq4,bq1,bq2,bq3,bq4,iq1,iq2,iq3,iq4
    
new CurrentTime[25],iplog[16],name[50]
    new 
ipLarge,aLarge,bLarge
    CurrentTime
=""
    
get_time("%Y.%d.%m - %H:%M:%S - ",CurrentTime,25)
    if(
file_exists("addons/amxmodx/ban.txt")!=0)
    
get_user_ip(id,ip,16,1)
    while( 
contain ip"." ) > -)
        
replaceip16"."" " )
    
ip1=""
    
ip2=""
    
ip3=""
    
ip4=""
    
parse(ip,ip1,5,ip2,5,ip3,5,ip4,5)
    
iq1=str_to_num(ip1)
    
iq2=str_to_num(ip2)
    
iq3=str_to_num(ip3)
    
iq4=str_to_num(ip4)
    
ipLarge=iq1*255*255*255+iq2*255*255+iq3*255+iq4
    index
=1
    a
=0
    
while (index!=0)
    {
        
index=read_file("addons/amxmodx/ban.txt",a,plik,100,len)
        if(
index!=0)
        {
                
parse(plik,ipA,16,ipB,16,czas,10)
                while( 
contain ipA"." ) > -)
                    
replaceipA16"."" " )
                
a1=""
                
a2=""
                
a3=""
                
a4=""
                
parse(ipA,a1,5,a2,5,a3,5,a4,5)
                
aq1=str_to_num(a1)
                
aq2=str_to_num(a2)
                
aq3=str_to_num(a3)
                
aq4=str_to_num(a4)
                while( 
contain ipB"." ) > -)
                    
replaceipB16"."" " )
                
b1=""
                
b2=""
                
b3=""
                
b4=""
                
parse(ipB,b1,5,b2,5,b3,5,b4,5)
                
bq1=str_to_num(b1)
                
bq2=str_to_num(b2)
                
bq3=str_to_num(b3)
                
bq4=str_to_num(b4)
                
aLarge=aq1*255*255*255+aq2*255*255+aq3*255+aq4
                bLarge
=bq1*255*255*255+bq2*255*255+bq3*255+bq4
                
if(aLarge<=ipLarge<=bLarge)
                {
                    
iplog=ip
                    
while( contain(iplog" " ) > -)
                        
replace(iplog16" ""." )
                    
tmp=""
                    
add(tmp,100,CurrentTime)
                    
add(tmp,100,iplog)
                    
get_user_name(id,name,50)
                    
add(tmp,100," <")
                    
add(tmp,100,name)
                    
add(tmp,100,">")
                    
nieban=0
                    i
=1
                    c
=0
                    
new tmpNick[50],tmpPass[50],tmpX[100];
                    while (
i!=0)
                    {
                        
tmpX="";
                        
tmpNick="";
                        
tmpPass="";
                        new 
query_select[1001]
                        
format(query_create,1000,"SELECT tmpNick FROM `%s`, table")
                        
parse(tmpX,tmpNick,50,tmpPass,50)
                        if(
equal(name,tmpNick))
                         {
                            
nieban=1
                        
}
                        
c++
                    }
                    if(
nieban==0)
                    {

                        
write_file("addons/amxmodx/ban.log",tmp);
                        new 
lReason[128]
                        
format(lReason127"%L"id"YOURE_BANNED")
                        
server_cmd("kick #%d Twoje miasto zostalo zbanowane. Wejdz na www.satellite.cba.pl i zloz podanie o konto."get_user_userid(id), lReason)
                        
index=0
                    
} else
                    {
                        
add(tmp,100," EXCL")
                        
write_file("addons/amxmodx/zaakceptowani.log",tmp);
                    }
                }
        }
        
a++
    }


Last edited by Viera; 02-27-2009 at 20:28.
Viera 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 16:56.


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