Is there any good MySQL table structure example
#1

Eh up,

I've been messing with MySQL recently and so far can't find any good table structure for MySQL. My question is if there is any good example of it. I've got this one, but it doesn't seem to be a paradise.

pawn Код:
/* 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", "");
Reply
#2

I personally avoid writing table creation queries by hand, I just create the table using PHPMyAdmin (just add whatever fields you REQUIRE, their datatype) and then retrieve the table code given in one of the settings! Or probably scout around SA-MP to find a good MySQL script and check out the structure there!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)