Problem with Query
#7

So it seems like I have forgotten to add a value but still, the line isn't adding, and how can I make an Primary key in SQLite (I know Im quite noob into databases, I used file based till now)

Here is the function
pawn Код:
stock CreateTruckPoint(delivID, delivType ,delivName[], delivObj[], cashreward = 0, Float:posx = -1.0, Float:posy = -1.0, Float:posz = -1.0)
{
    new query[128];
    format(query, sizeof(query), "INSERT INTO `TruckPoints` (`DeliveryID`, `DeliveryType`, `DeliveryObjective`, `DeliveryName`, `CashReward`, `FinalPositionX`, `FinalPositionY`, `FinalPositionZ`) VALUES('%d', '%d', '%s', '%s', '%d', '%f', '%f', '%f')", delivID, delivType, delivObj, delivName, cashreward, posx, posy, posz);
    db_query(truckpoints, query);
    return 1;
}
Reply


Messages In This Thread
Problem with Query - by XStormiest - 21.05.2016, 08:32
Re: Problem with Query - by luke49 - 21.05.2016, 08:36
Re: Problem with Query - by XStormiest - 21.05.2016, 08:38
Re: Problem with Query - by ScIrUsna - 21.05.2016, 08:40
Re: Problem with Query - by Sjn - 21.05.2016, 08:41
Re: Problem with Query - by Sawalha - 21.05.2016, 08:45
Re: Problem with Query - by XStormiest - 21.05.2016, 08:48
Re: Problem with Query - by luke49 - 21.05.2016, 08:51
Re: Problem with Query - by XStormiest - 21.05.2016, 08:55
Re: Problem with Query - by Sawalha - 21.05.2016, 08:59

Forum Jump:


Users browsing this thread: 2 Guest(s)