04.09.2013, 10:46
try edit:
edit: btw better to use MD5 coding for passwords, for example:
pawn Код:
format(string, sizeof(string), "SELECT * FROM 'users' WHERE 'username' = '%s'", name);
to:
format(string, sizeof(string), "SELECT * FROM `users` WHERE `username` = '%s'", name);
format(string, sizeof(string), "INSERT INTO 'users' ('username', 'password') VALUES ('%s', '%s')", name, inputtext);
to:
format(string, sizeof(string), "INSERT INTO `users` (username, `password`) VALUES ('%s', '%s')", name, inputtext);
format(string, sizeof(string), "SELECT * FROM 'users' WHERE 'username' = '%s' AND 'password' = '%s'", name, inputtext);
to:
format(string, sizeof(string), "SELECT * FROM `users` WHERE `username` = '%s' AND `password` = '%s'", name, inputtext);
pawn Код:
format(string, sizeof(string), "INSERT INTO `users` (username, `password`) VALUES ('%s', MD5('%s'))", name, inputtext);
format(string, sizeof(string), "SELECT * FROM `users` WHERE `username` = '%s' AND `password` = MD5('%s')", name, inputtext);