15.10.2011, 10:26
I queried "DESCRIBE GlobalInfo" in MySQL (GlobalInfo is also a table)
This code is executed in OnGameModeInit. It seems to be fine?
Now the MySQL log returns this:
And this is the stuff put in the table:
I don't understand why it says the fields are empty? As you see, it's not!
Jochem
Code:
ConfigKey varchar(20) NO PRI 0 ConfigValue int(11) YES
Code:
mysql_query("SELECT * FROM `GlobalInfo` WHERE `ConfigKey` = 'GasStationFuel'"); mysql_store_result(); mysql_get_field("ConfigValue",Store); GlobalInfo[GasStationFuel] = strval(Store);
Code:
[10:24:43] CMySQLHandler::Query(SELECT * FROM `GlobalInfo` WHERE `ConfigKey` = 'GasStationFuel') - Successfully executed. [10:24:43] >> mysql_store_result( Connection handle: 1 ) [10:24:43] CMySQLHandler::StoreResult() - Result was stored. [10:24:43] >> mysql_fetch_field_row( Connection handle: 1 ) [10:24:43] CMySQLHandler::FetchField(ConfigValue) - You cannot call this function now. (Reason: Fields/Rows are empty.)
I don't understand why it says the fields are empty? As you see, it's not!
Jochem