MySQL caching question
#1

pawn Код:
stock mySQL_init()
{
    mysql_debug(1);
    g_Handle = mysql_connect(SQL_HOST, SQL_USER, SQL_DB, SQL_PASS);
   
    /* Table Structure - kind of messy, I know. */
    mysql_function_query(g_Handle, "CREATE TABLE IF NOT EXISTS `users` ( \
        `id` int(11) NOT NULL AUTO_INCREMENT, \
        `name` varchar(24) NOT NULL, \
        `pass` varchar(129) NOT NULL, \
        `salt` varchar(30) NOT NULL, \
        `health` float NOT NULL, \
        `X` float NOT NULL, \
        `Y` float NOT NULL, \
        `Z` float NOT NULL, \
        `A` float NOT NULL, \
        `interior` int(2) NOT NULL, \
        `vw` int(11) NOT NULL, \
        `skin` int(3) NOT NULL, \
        PRIMARY KEY (`id`) \
    )"
, false, "SendQuery", "");

    return 1;
}
pawn Код:
forward SendQuery();
public SendQuery()
{
    // callback for queries that don't fetch data
    return 1;
}
Could someone please give me an example of what to put in this callback?
Reply
#2

Check this tutorial out. Explains almost everything.

Link: https://sampforum.blast.hk/showthread.php?tid=337810
Reply
#3

Ah, so basically I could just leave it like it is and everything would work fine?
Reply
#4

You only need to use a callback for select, show, describe and - in rare occasions - insert statements.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)