SA-MP Forums Archive
SQL SAVING HELP - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: SQL SAVING HELP (/showthread.php?tid=551549)



SQL SAVING HELP - bogushas - 19.12.2014

PHP код:
stock saveHouses(id)
{
    
format(g_szBuffersizeof g_szBuffer
    
"UPDATE "MySQL_HOUSES_TABLE" SET \
    \
        savininkas = '%s', \
        PirkimoBusena = %i,    \
        verte = %i, \
        interior = %i, \
        kaina = %i,    \
        uzraktas = %i, \
        security = %i, \
        TotalTaxes = %i, \
        Renter = '%s', \
        RentPrice = %i, \
        Rentable = %i, \
        Case = %i, \
        TotalCase = %i \
    \
    WHERE ID = %i"
,
    
namai[id][hSavininkas],
    
namaiid ][ hNupirktas ], 
    
namaiid ][ hVerte ],
    
namaiid ][ hInterior ],
    
namaiid ][ hKaina ],
    
namaiid ][ hLock ],
    
namaiid ][ hSecurity ],
    
namaiid ][ hTotalTaxes ],
    
namaiid ][ hRenter ],
    
namaiid ][ hRentPrice ],
    
namaiid ][ hRentable ],
    
namaiid ][ hCase ],
    
namaiid ][ hTotalCase ],
    
namaiid ][ fromSQL ]);
    
sql_query(sqlg_szBufferQUERY_THREADED); // threaded naudoti kai neimi duomenų iљ mysql

debug:
PHP код:
[20:21:03][debugNatives::sql_queryScheduling statement (stmt->id 38stmt->query UPDATE houses SET savininkas 'Iam_Satan'PirkimoBusena 1,    verte 234046interior 0kaina 234046,    uzraktas 0security 0TotalTaxes 1670Renter '-'RentPrice 0Rentable 0, Case = 0TotalCase 0 WHERE ID 2stmt->callback = ) for execution... 
TotalTaxes is 1670 when saving, but in database it shows as 0


Re: SQL SAVING HELP - bogushas - 20.12.2014

any ideas?


Re: SQL SAVING HELP - NGGMars - 20.12.2014

You check that on Server Init The Connection to the Mysql DB is Succesful. Sometimes the Gamemode may glitch on the Mysql DB Connection Problems

I dont Have any other ideas, This Problem is Strange to me


Re: SQL SAVING HELP - bogushas - 20.12.2014

Quote:
Originally Posted by FuriousRoleplay
Посмотреть сообщение
You check that on Server Init The Connection to the Mysql DB is Succesful. Sometimes the Gamemode may glitch on the Mysql DB Connection Problems

I dont Have any other ideas, This Problem is Strange to me
Everything is okay with the connection.


Re: SQL SAVING HELP - Misiur - 20.12.2014

Is that your whole log? Isn't there a next line like
Quote:

[21:24:20][debug] Natives:ql_query: Statement executed (stmt->id = 38, stmt->error = 0). No callback found!




Re: SQL SAVING HELP - bogushas - 20.12.2014

Quote:
Originally Posted by Misiur
Посмотреть сообщение
Is that your whole log? Isn't there a next line like
http://pastebin.com/A508cDm4 it's the whole log, it shows no callback found but all the houses load in server with their information perfect.


Re: SQL SAVING HELP - Misiur - 20.12.2014

"Case" is a reserved keyword. Either change your field name to something else, or use backticks, like
Quote:

`Case` = 123

Also I saw
Quote:

mokestis = 0WHERE ID = '1'

you are missing a space there, so that query won't execute either

Isn't there any error reporting for that specific plugin?


Re: SQL SAVING HELP - bogushas - 20.12.2014

Quote:
Originally Posted by Misiur
Посмотреть сообщение
"Case" is a reserved keyword. Either change your field name to something else, or use backticks, like


Also I saw you are missing a space there, so that query won't execute either

Isn't there any error reporting for that specific plugin?
Oh.. Thanks, the problem was with "case"!