Raised This Month: $ Target: $400
 0% 

newbie problem with sqlx "no such table"


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Exceed
Member
Join Date: Oct 2004
Old 02-01-2009 , 21:46   newbie problem with sqlx "no such table"
Reply With Quote #1

I get the error message, "no such table: User_info" as i am connection to my database.

I have a table called User_info with 2 rows in it.

This is the first time i am trying to use sqlx and i have no idea if i am doing it right (i have very little experience with small).

PHP Code:
public LoadData(id)
{
    new 
AuthID[32], PlayerXP[32], PlayerLevel[32], PlayerClass[33], PlayerMoney[32], PlayerKills[32], PlayerDeath[32]
    
get_user_authid(id,AuthID,31)
    
    new 
error[128], ErrorCode
    
    
new Handle:info SQL_MakeDbTuple(sqlHost,sqlUser,sqlPass,sqlDB)
    new 
Handle:sql SQL_Connect(g_SqlTuple,ErrorCode,g_Error,511)
    
    new 
Handle:Query SQL_PrepareQuery(sql,"SELECT %s,%s,%s,%s,%s FROM %s WHERE %s='%s'",sqlMoney,sqlKills,sqlDeaths,sqlExp,sqlLevel,sqlTable,sqlAuthid,AuthID)
    
    if (!
SQL_Execute(Query))
    {
        
SQL_QueryError(Queryerror127)
        
server_print("[AMXX] Could not connect to SQL database. Error: %s"error)
    } else {
    
        
PlayerMoney[id] = SQL_FieldNameToNum(QuerysqlMoney)
        
PlayerKills[id] = SQL_FieldNameToNum(QuerysqlKills)
        
PlayerDeath[id]  = SQL_FieldNameToNum(QuerysqlDeaths)
        
PlayerXP[id]  = SQL_FieldNameToNum(QuerysqlExp)
        
PlayerLevel[id] = SQL_FieldNameToNum(QuerysqlLevel)
}
        
SQL_FreeHandle(Query)
        
SQL_FreeHandle(sql)
        
SQL_FreeHandle(info)

    return 
PLUGIN_CONTINUE

Thankyou for your time.
__________________
Exceed^ - I JUST CAN'T STOP.
Exceed 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 01:38.


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