PDA

View Full Version : mysql


Suikast
08/07/2018, 10:32 AM
what is the Problem?

[10:15:49 07/08/18] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('2') (Query: "SELECT *, DATE_FORMAT(lastlogin, '%D of %M, %Y @ %k:%i') AS login_date FROM users WHERE username = 'Bradley_Manzoni' AND password = 'C246AE89E88004BA4C2A92F46A814024C10DFF3FD1433C78B 25912034DC64EC50C18CF86299E86D8C04A8DAAF367F021D2B 69AFFEB95351AEDDC951E5F88A264'")
[10:15:49 07/08/18] [ERROR] cache_get_field_content_int - invalid datatype
[10:16:49 07/08/18] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('100') (Query: "SELECT * FROM vehicles WHERE ownerid = 177 LIMIT 3, 1")
[10:16:49 07/08/18] [ERROR] cache_get_field_content_int - invalid datatype
[10:40:05 07/08/18] [ERROR] cache_get_field_content_int - invalid datatype
[10:40:05 07/08/18] [ERROR] cache_get_field_content_int - invalid datatype
[10:42:02 07/08/18] [ERROR] cache_get_field_content_int - invalid datatype
[10:42:02 07/08/18] [ERROR] cache_get_field_content_int - invalid datatype
[10:56:33 07/08/18] [ERROR] cache_get_field_content_int - invalid datatype
[10:56:33 07/08/18] [ERROR] cache_get_field_content_int - invalid datatype
[12:26:59 07/08/18] [ERROR] cache_get_field_content_int - invalid datatype

CodeStyle175
08/07/2018, 11:13 AM
what is this even?

Suikast
09/07/2018, 08:12 PM
what is this even?

ist mysql_log i have These Errors and i dont know how to fixx

Calisthenics
09/07/2018, 08:42 PM
A table has 5 columns: a, b, c, d, e
If you do:

SELECT *, DATE_FORMAT(...) as login_date ...

row indexes 0, 1, 2, 3, 4 are reserved to * (all, five of them)
row index 6 is login_date

If you do not remember what column is first, what is second and so on, you can retrieve by its name. Make sure the datatype is correct. This means, if column is VARCHAR you cannot use cache_get_value_int to retrieve it as integer.

100 columns in vehicles table? way too many. Optimize database structure as well.

For more information, you will need to post the code you load the data with these queries.

Suikast
10/07/2018, 07:10 PM
A table has 5 columns: a, b, c, d, e
If you do:

SELECT *, DATE_FORMAT(...) as login_date ...

row indexes 0, 1, 2, 3, 4 are reserved to * (all, five of them)
row index 6 is login_date

If you do not remember what column is first, what is second and so on, you can retrieve by its name. Make sure the datatype is correct. This means, if column is VARCHAR you cannot use cache_get_value_int to retrieve it as integer.

100 columns in vehicles table? way too many. Optimize database structure as well.

For more information, you will need to post the code you load the data with these queries.



i have this at Code

mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT *, DATE_FORMAT(lastlogin, '%s') AS login_date FROM users WHERE username = '%s' AND password = '%s'", specifiers, GetPlayerNameEx(playerid), password);
mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_PROCESS_LOGIN, playerid);