Problem MySQL T_LoadData
Any idea what I'm doing wrong here?
Code:
#include <sourcemod> Code:
L 08/20/2019 - 19:43:27: [SM] Exception reported: No current result set Quote:
|
Re: Problem MySQL T_LoadData
can i ask why are you doing
Code:
results.FieldNameToNum("valoare", valoareCol); Code:
results.FieldNameToNum("valoare", 0); also you posted half of the error, it should be something like this Code:
L 08/20/2019 - 19:43:27: [SM] Exception reported: [Reason] |
Re: Problem MySQL T_LoadData
Quote:
https://sm.alliedmods.net/new-api/db...FieldNameToNum |
Re: Problem MySQL T_LoadData
afaik you are trying to find the field index but the result is not fetched try doing
Code:
//If a row set was returned: |
Re: Problem MySQL T_LoadData
Quote:
Code:
L 08/21/2019 - 01:46:35: [SM] Exception reported: No current result set |
Re: Problem MySQL T_LoadData
I'm sorry for the mistake but the error comes from the sql statement when doing update you dont actually select any field and which means the query table is empty and you can't find the field index
you need to use the select * statement instead |
Re: Problem MySQL T_LoadData
Quote:
|
Re: Problem MySQL T_LoadData
Code:
Use fast query for UPDATE,INSERT,DELETE (operations without a result set). Code:
public void OnClientDisconnect(int client) Fast query doc -> https://sm.alliedmods.net/new-api/dbi/SQL_FastQuery Note: SQL_FastQuery is a non-threaded querie so keep that in mind when you are using it with threaded queries. or change the line Code:
g_Database.Query(T_LoadData, query, GetClientUserId(client)); //from OnClientDisconnect where you have the update query Also make sure to have a default column value for 'valoare' , maybe 0 since you store points or credits. |
Re: Problem MySQL T_LoadData
Quote:
|
Re: Problem MySQL T_LoadData
For a simple non-threaded database I prefer FastQuery , in his example mixing both might be a bad idea but that's a solution too .
|
All times are GMT -4. The time now is 23:49. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.