mysql_function_query
#6

Quote:
Originally Posted by CrazyChoco
View Post
It's not custom. This feature has been a part of the BlueG mysql plugin since R7.
ah! ye ye of course!
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", "");
but you used it like this:
pawn Code:
mysql_function_query(g_Handle, qry1);
it's totally okey that you store the query in a string (qry1) thats not the problem.
youre just missing the other 3 params: false, "SendQuery", ""

prototype:
pawn Code:
native mysql_function_query(connectionHandle, query[], bool:cache, callback[], format[], {Float,_}:...);
it should look like
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", "");
Reply


Messages In This Thread
mysql_function_query - by TonyII - 03.01.2015, 10:47
AW: mysql_function_query - by CutX - 03.01.2015, 10:55
Re: mysql_function_query - by TonyII - 03.01.2015, 11:00
AW: Re: mysql_function_query - by CutX - 03.01.2015, 11:03
Re: AW: Re: mysql_function_query - by CrazyChoco - 03.01.2015, 11:07
AW: Re: AW: Re: mysql_function_query - by CutX - 03.01.2015, 11:17
Re: mysql_function_query - by TonyII - 03.01.2015, 11:24
AW: Re: mysql_function_query - by CutX - 03.01.2015, 11:29
Re: mysql_function_query - by TonyII - 03.01.2015, 11:32
Re: mysql_function_query - by CoaPsyFactor - 03.01.2015, 11:43

Forum Jump:


Users browsing this thread: 1 Guest(s)