20.01.2013, 01:58
I can use sscanf in SQLite?
Instead db_get_field_assoc?
Код:
public OnGameModeInit() { Database = db_open("Server.db"); DatabaseResult = db_query(Database,"CREATE TABLE IF NOT EXISTS `Private Vehicles` (`Id` INT(5),`Price` INT(10),`Owner` CHAR(25),`Interior` INT(5),`PositionX` FLOAT(10,5),`PositionY` FLOAT(10,5),`PositionZ` FLOAT(10,5),`PositionA` FLOAT(10,5))"); db_free_result(DatabaseResult); for(new PV = 0; PV < MAXIMAL_PRIVATE_VEHICLES; PV++) { format(Query,500,"SELECT * FROM `Private Vehicles` WHERE `Id` = '%d'",PV); DatabaseResult = db_query(Database,Query); if(db_num_rows(DatabaseResult)) { } if(!db_num_rows(DatabaseResult)) continue; } return 1; }