03.01.2015, 11:17
Quote:
It's not custom. This feature has been a part of the BlueG mysql plugin since R7.
|
now i remember

it's used like this:
pawn Code:
mysql_function_query(g_Handle, "CREATE TABLE IF NOT EXISTS `accounts` ( \
`ID` int(6) NOT NULL AUTO_INCREMENT, \
`Name` varchar(24) NOT NULL, \
`Pass` varchar(170) NOT NULL, \
`Salt` varchar(20) NOT NULL, \
`IP` varchar(16) DEFAULT NULL, \
`SecCode` varchar(10) NOT NULL,\
`Score` int(6) NOT NULL, \
`ALevel` int(1) NOT NULL,\
`Money` int(13) NOT NULL, \
`Bank` int(13) NOT NULL, \
`Wanted` int(4) NOT NULL, \
`RegDate` varchar(20) NOT NULL, \
PRIMARY KEY (`ID`) \
)", false, "SendQuery", "");
pawn Code:
mysql_function_query(g_Handle, qry1);
youre just missing the other 3 params: false, "SendQuery", ""
prototype:
pawn Code:
native mysql_function_query(connectionHandle, query[], bool:cache, callback[], format[], {Float,_}:...);
pawn Code:
strcat(qry1,"CREATE TABLE IF NOT EXISTS `users` ( \
`id` int(11) NOT NULL AUTO_INCREMENT, \
`name` varchar(24) NOT NULL, \
`pass` varchar(129) NOT NULL, \
`health` float NOT NULL, \
`X` float NOT NULL, \
`Y` float NOT NULL, \
`Z` float NOT NULL, \
`A` float NOT NULL, ");
strcat(qry1,"`interior` int(2) NOT NULL, \
`vw` int(11) NOT NULL, \
`skin` int(3) NOT NULL, \
`banned` int(3) NOT NULL, \
`primary` int(3) NOT NULL, \
`primaryammo` int(5) NOT NULL, \
`secondary` int(3) NOT NULL, \
`secondaryammo` int(5) NOT NULL, PRIMARY KEY (`id`))");
mysql_function_query(g_Handle, qry1, false, "SendQuery", "");