11.02.2019, 21:47
Hello,
I need help with mysql table plase.
My table not funciton :
Thank you.
I need help with mysql table plase.
Код:
Registruj(playerid, const sheslo[]) { new heslo[64]; mysql_escape_string(sheslo, heslo, handle); if (!KontrolaFormatu(heslo)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Registrбcia", "Zadaj svoje heslo\n(Dostupnй znaky: 0-9, a-Z)", "Ok", "Zruљ"); new query[72+MAX_PLAYER_NAME+32]; mysql_format(handle, query, sizeof(query), "INSERT INTO `ASystem` (nick, pass, hodnost, prihlaseny) VALUES ('%s', MD5('%s'), 0, 0)", Meno(playerid), heslo); mysql_query(handle, query); return 1; }
Код:
CREATE TABLE IF NOT EXISTS `ASystem` ( `nick` varchar(25) NOT NULL, `pass` varchar(64) NOT NULL, `hodnost` int(11) NOT NULL, `prihlaseny` int(11) NOT NULL, PRIMARY KEY (`nick`,`pass`,`hodnost`,`prihlaseny`), UNIQUE KEY `nick` (`nick`), UNIQUE KEY `pass` (`pass`), UNIQUE KEY `hodnost` (`hodnost`), UNIQUE KEY `prihlaseny` (`prihlaseny`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;