15.12.2015, 02:04
Yeah but still row 1 is set as NULL
I fixed the prob with invalid datatype
I was using int instead of float but still the problem remains
EDIT: SA:MP log
It prints as it should be but still not saving the ID 1 at all
EDIT 2: new SQL log
PHP код:
[04:02:30] [DEBUG] Calling callback "OnFactoryLoad"..
[04:02:30] [DEBUG] cache_get_data - connection: 1
[04:02:30] [DEBUG] cache_get_field_content_int - row: 0, field_name: "ID", connection: 1
[04:02:30] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "ID", data: "1"
[04:02:30] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Resources", connection: 1
[04:02:30] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Resources", data: "NULL"
[04:02:30] [ERROR] cache_get_field_content_int - invalid datatype
[04:02:30] [DEBUG] cache_get_field_content_int - row: 1, field_name: "ID", connection: 1
[04:02:30] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "ID", data: "2"
[04:02:30] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Resources", connection: 1
[04:02:30] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "Resources", data: "6520"
[04:02:30] [DEBUG] cache_get_field_content_int - row: 2, field_name: "ID", connection: 1
[04:02:30] [DEBUG] CMySQLResult::GetRowDataByName - row: '2', field: "ID", data: "3"
[04:02:30] [DEBUG] cache_get_field_content_int - row: 2, field_name: "Resources", connection: 1
[04:02:30] [DEBUG] CMySQLResult::GetRowDataByName - row: '2', field: "Resources", data: "3000"
[04:02:30] [DEBUG] cache_get_field_content_int - row: 3, field_name: "ID", connection: 1
I was using int instead of float but still the problem remains
EDIT: SA:MP log
PHP код:
[04:14:19] UPDATE `factories` SET `Resources`=500.0 WHERE `ID`=1
[04:14:19] UPDATE `factories` SET `Resources`=6520.0 WHERE `ID`=2
[04:14:19] UPDATE `factories` SET `Resources`=3000.0 WHERE `ID`=3
EDIT 2: new SQL log
PHP код:
[04:28:15] [DEBUG] Calling callback "OnFactoryLoad"..
[04:28:15] [DEBUG] cache_get_data - connection: 1
[04:28:15] [DEBUG] cache_get_field_content_int - row: 0, field_name: "ID", connection: 1
[04:28:15] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "ID", data: "1"
[04:28:15] [DEBUG] cache_get_field_content_float - row: 0, field_name: "Resources", connection: 1
[04:28:15] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Resources", data: "000000000000"
[04:28:15] [DEBUG] cache_get_field_content_int - row: 1, field_name: "ID", connection: 1
[04:28:15] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "ID", data: "2"
[04:28:15] [DEBUG] cache_get_field_content_float - row: 1, field_name: "Resources", connection: 1
[04:28:15] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "Resources", data: "000000006520"
[04:28:15] [DEBUG] cache_get_field_content_int - row: 2, field_name: "ID", connection: 1
[04:28:15] [DEBUG] CMySQLResult::GetRowDataByName - row: '2', field: "ID", data: "3"
[04:28:15] [DEBUG] cache_get_field_content_float - row: 2, field_name: "Resources", connection: 1
[04:28:15] [DEBUG] CMySQLResult::GetRowDataByName - row: '2', field: "Resources", data: "000000003000"