Raised This Month: $ Target: $400
 0% 

MYSQL Problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 11-09-2011 , 17:05   Re: MYSQL Problem
Reply With Quote #2

If you are using sqlx, then you should do this with SQL_ThreadQuery. Anyway try this:
PHP Code:
    // Connect to SQL
    
new Handle:SqlConnect SQL_Connect(g_hTupleErrorCodeg_Error511)
    if(
SqlConnect == Empty_Handle)
    {
        
log_amx("SQL Error: %s"g_Error)
        return 
PLUGIN_HANDLED;
    }
    
// Create Handle
    
new Handle:Query
    Query 
SQL_PrepareQuery(SqlConnect"SELECT * FROM `cuentas` WHERE (`Nombre` = '%s')"cuenta[id]) //--> line 393
    
    // Query Execute ?
    
if (SQL_Execute(Query))
    {
        if (!
SQL_NumResults(Query))
        {        
            
crear_contrasenia(id)        
        }
        else
        {
            
mensajes_cuenta(id1)
            
client_print(idprint_center"Esa cuenta ya existe!")            
            
show_menu_cuenta(id)
        }
        
SQL_FreeHandle(Query)
        
SQL_FreeHandle(SqlConnect)
        return 
PLUGIN_HANDLED;
    }  
    
SQL_FreeHandle(SqlConnect
__________________
Impossible is Nothing
Sylwester 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 14:21.


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