Quote:
Originally Posted by Abreezy
Alright for the
pawn Код:
format(query, sizeof(query), "SELECT * FROM Vehicles WHERE Plate = \'%s\'", plate);
Whats the
I've only done '%s' before, whats the difference?
|
The \ is an escape character, you are supposed to escape quotes (', ") in SQL queries to avoid SQL injection. It's important in this situation, because you're directly taking a player's input into a query.
Quote:
Originally Posted by Abreezy
Also, just to ensure im not stupid, I could then go about by doing something like
pawn Код:
Vehicles[model][Ownername]
Or would that not work?
|
What EXACTLY is the purpose of this vehicleinfo command? Are you trying to load cars from a table and store their values into variables, or just fetch data from the table to show in a clientmessage?