SQLite problem
#1

When i enter this in my SQLite Database browser it just blocks and stop working.


INSERT INTO `HOUSES` ( 'ID', 'NAPRODAJU', 'VLASNIK', 'CIJENA', ADRESA', 'X', 'Y', 'Z', 'INZX', 'INTY', 'INTZ', 'MATS', 'DROGA', 'NOVAC', 'BRAVA', 'INT', 'RENTABIL', 'RENT', 'ALARM')



Where is the problem?
Reply
#2

your giving the table field names but not the values.

INSERT INTO `HOUSES` ( ....)VALUES(...)
Reply
#3

Same thing,when i enter something i know it works its all fine, no error.
Reply
#4

it wont give an error if sql syntax is wrong,

post what you changed,

heres how i insert!

pawn Код:
//first i build my values to insert
format
    (
        Query_Values,
        sizeof(Query_Values),
        "'%i','%f','%f','%f','%f','%f','%f'",
        gDBObjs[objectid][E_DB_OBJ_MODEL],
        gDBObjs[objectid][E_DB_OBJ_X],
        gDBObjs[objectid][E_DB_OBJ_Y],
        gDBObjs[objectid][E_DB_OBJ_Z],
        gDBObjs[objectid][E_DB_OBJ_RX],
        gDBObjs[objectid][E_DB_OBJ_RY],
        gDBObjs[objectid][E_DB_OBJ_RZ]
    );
//then i build a query and  append my Values from above to it
    format(Query, sizeof(Query), "INSERT INTO OBJS (`MODEL`,`X`, `Y`, `Z`, `RX`, `RY`, `RZ`) VALUES(%s)", Query_Values);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)