MySQL Plugin (Variables)
#1

How can I use variables within a query? It does not show anywhere how to? for example in most plugins you can use %i for an integer then you can specify the variable that the integer is stored in at the end of the function.
the plugin that I am using for MySQL is here and I am using this plugin as the others are giving me a little bit of issues.

An example of what I mean
pawn Код:
mysql_query("INSERT INTO `houseinfo` (owned) VALUES (%i)", owned, connection);
Reply
#2

Format it first using format().

pawn Код:
format(query, sizeof(query), "INSERT INTO `houseinfo` (owned) VALUES (%i)", owned);
mysql_query(query, connection);
Reply
#3

Quote:
Originally Posted by AndreT
Посмотреть сообщение
Format it first using format().

pawn Код:
format(query, sizeof(query), "INSERT INTO `houseinfo` (owned) VALUES (%i)", owned);
mysql_query(query, connection);
Ahhh thanks man
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)