Mysql problem
#7

Quote:
Originally Posted by MadeMan
Посмотреть сообщение
The line looks like this: 0.00|0.00|0.00
So delimiter is '|'

pawn Код:
stock LoadParkingLot()
{
    CheckMySQL();

    mysql_query("SELECT * FROM parkinglot");
    mysql_store_result();

    new field[256];
    new carloop;
    while(mysql_fetch_row_format(field, "|") && carloop < 10)
    {
        unformat(field,"p<|>ffffds[24]",ParkingLotInformation[carloop][CarPositionX],ParkingLotInformation[carloop][CarPositionY],ParkingLotInformation[carloop][CarPositionZ],ParkingLotInformation[carloop][CarPositionA],ParkingLotInformation[carloop][CarModelID],ParkingLotInformation[carloop][CarOwner]);
        if(ParkingLotInformation[carloop][CarModelID] != 0 && ParkingLotInformation[carloop][CarModelID] != -1) { ParkingLotInformation[carloop][VehicleIDD] = CreateVehicle(ParkingLotInformation[carloop][CarModelID], ParkingLotInformation[carloop][CarPositionX],ParkingLotInformation[carloop][CarPositionY],ParkingLotInformation[carloop][CarPositionZ], ParkingLotInformation[carloop][CarPositionA], -1, -1, -1); }
    }
    return mysql_free_result();
}
No, The delimiter in each row is ','.
Reply


Messages In This Thread
Mysql problem - by Kyle - 03.05.2011, 21:40
Re: Mysql problem - by Georgelopez1 - 03.05.2011, 21:57
Re: Mysql problem - by Kyle - 04.05.2011, 06:27
Re: Mysql problem - by Calgon - 04.05.2011, 07:57
Re: Mysql problem - by Kyle - 04.05.2011, 13:15
Re: Mysql problem - by MadeMan - 04.05.2011, 13:23
Re: Mysql problem - by Kyle - 04.05.2011, 13:25
Re: Mysql problem - by MadeMan - 04.05.2011, 13:29
Re: Mysql problem - by Kyle - 04.05.2011, 13:30
Re: Mysql problem - by MadeMan - 04.05.2011, 13:32

Forum Jump:


Users browsing this thread: 1 Guest(s)