#1

Hello,

I'm using SQLITE, and I've a SQLITE Database I want a query to set all user vehiclekey1, vehiclekey2, vehiclekey3, vehiclekey4 and vehiclekey5 to 0

Thank you.
Reply
#2

pawn Код:
new msg[2000];
format(msg,sizeof(msg),"UPDATE tablename SET vehiclekey1 = 0, vehiclekey2 = 0, vehiclekey3 = 0, vehiclekey4 = 0,  vehiclekey5, 0 WHERE User = %d", userid);
Is this what you mean ?
Reply
#3

Got that error "near "new": syntax error: "
Reply
#4

Show me the complete error, by the way i have just given you the query .. you need to execute it using
Quote:

mysql_query(msg);

or something. Im not sure about your SQL version commands
Reply
#5

http://prntscr.com/3lwyxu
Reply
#6

He gave you an example so you have to change the name of the table/fields to those you use.

With that program, you can execute queries directly - you don't need the format function at all. All you have to execute for your case is:
pawn Код:
UPDATE table_name SET field_name = 0, field2_name = 0 WHERE field_name = 'some_value or text'
Reply
#7

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
He gave you an example so you have to change the name of the table/fields to those you use.

With that program, you can execute queries directly - you don't need the format function at all. All you have to execute for your case is:
pawn Код:
UPDATE table_name SET field_name = 0, field2_name = 0 WHERE field_name = 'some_value or text'
Oh yeah i wasn't sure about the SQLite, but the query was like that though.. also i wasn't sure about his database tables
Reply
#8

Thanks guys for helping! Repped.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)