AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [HELP] sql code doesnt working (https://forums.alliedmods.net/showthread.php?t=224205)

quark 08-21-2013 08:32

[HELP] sql code doesnt working
 
PHP Code:

public UpdateValues()
{
    new 
szTemp512 ]
    
formatexszTempcharsmaxszTemp ),
    
"UPDATE %s SET value1 = '%d', value2 = '%d' WHERE id = '%d'",
    
TABLEvalue1value2ID )
    
    
SQL_ThreadQueryg_SqlTuple"IgnoreHandle"szTemp )
}

public 
IgnoreHandleFailStateHandle:QueryError[ ], ErrcodeData[ ], DataSize )
{
    
SQL_FreeHandleQuery )


So , i'm trying to put in table 2 values, but it's not working.
No output errors or log errors.

^SmileY 08-21-2013 09:51

Re: [HELP] sql code doesnt working
 
Try to see if show a error in sql

PHP Code:

public IgnoreHandleFailStateHandle:QueryError[ ], ErrcodeData[ ], DataSize )
{
    if(
FailState)
    {
        
server_print(Error);
    }

    
SQL_FreeHandleQuery )



but, ID in formatex function is a string or a integer value?

quark 08-21-2013 10:04

Re: [HELP] sql code doesnt working
 
it's a number.

^SmileY 08-21-2013 10:08

Re: [HELP] sql code doesnt working
 
Quote:

Originally Posted by quark (Post 2018676)
it's a number.

You tried to see a error?

quark 08-21-2013 10:23

Re: [HELP] sql code doesnt working
 
No errors on logs , and i dont have acess to server console.

^SmileY 08-21-2013 10:33

Re: [HELP] sql code doesnt working
 
Quote:

Originally Posted by quark (Post 2018688)
No errors on logs , and i dont have acess to server console.

It is a error in sql syntax for me, but if you not get errors or not acess server console, we not able to help you only using this informations.

For last trie,

PHP Code:

public IgnoreHandleFailStateHandle:QueryError[ ], ErrcodeData[ ], DataSize )
{
    if(
FailState)
    {
        
log_amx(szError);
    }

    
SQL_FreeHandleQuery )



quark 08-21-2013 10:56

Re: [HELP] sql code doesnt working
 
Quote:

Originally Posted by ^SmileY (Post 2018696)
It is a error in sql syntax for me, but if you not get errors or not acess server console, we not able to help you only using this informations.

For last trie,

PHP Code:

public IgnoreHandleFailStateHandle:QueryError[ ], ErrcodeData[ ], DataSize )
{
    if(
FailState)
    {
        
log_amx(szError);
    }

    
SQL_FreeHandleQuery )



You we're right, it was a syntax error. It's fully working now :)


All times are GMT -4. The time now is 15:52.

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