Simpe MySQL register login system not working.
#1

Hello guys just wondering what im doing wrong here.

http://pastebin.com/WwkWmwkA

Its not registering the account on the Database
i have 3 fields on the structure of the DB

Name - varchar
Password - varchar
AdminLevel - INT

Reply
#2

pawn Код:
stock mySQL_init()
{
    mysql_debug(1);
    gHandle = mysql_connect(SQL_HOST, SQL_USER, SQL_DB, SQL_PASS);

    /* Table Structure - kind of messy, I know. */
    mysql_function_query(gHandle, "CREATE TABLE IF NOT EXISTS `users` ( \
        `ID` int(11) NOT NULL AUTO_INCREMENT, \
        `Name` varchar(24) NOT NULL, \
        `Password` varchar(129) NOT NULL, \
        PRIMARY KEY (`id`) \
    )"
, false, "SendQuery", "");

    return 1;
}
This is just a tip how to handle it. I'm using BlueG's newest MySQL plugin so you gotta upgrade to it if you already haven't.
Reply
#3

Im using the older version of BlueG's mysql plugin
Reply
#4

Change the password size to 129 in your database and then try.
Reply
#5

Quote:
Originally Posted by biker122
Посмотреть сообщение
Change the password size to 129 in your database and then try.
Hey, i just tried it, that hasnt changed anything
Reply
#6

Check ur mysql_log.txt file, there must be something wrong
Reply
#7

ive checked the log. all is good all i can think of that the code to create the players account in the gamemode is in correct
Reply
#8

Gotcha!
You have an error in your register dialog. @ INSERT INTO query.
pawn Код:
Name, Password, AdminLevel,
Should be
pawn Код:
Name, Password, AdminLevel
I mean, you have an additional "," in the query.[
Reply
#9

Quote:
Originally Posted by biker122
Посмотреть сообщение
Gotcha!
You have an error in your register dialog. @ INSERT INTO query.
pawn Код:
Name, Password, AdminLevel,
Should be
pawn Код:
Name, Password, AdminLevel
I mean, you have an additional "," in the query.[
^


@Kontrol: when u check mysql log, search for "error" , and yea, that's a syntax error, doesn't appear in your complier, but appears in the mysql_log.txt
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)