syntax error?
#1

I've honestly no idea why I'm getting syntax errors on this code (the query).

pawn Код:
new buff[129];
                WP_Hash(buff, sizeof(buff), inputtext);
                mysql_real_escape_string(Name, EscapedName);
                mysql_real_escape_string(buff, EscapedPassword);
                #pragma unused Name
                format(Query, sizeof(Query), "INSERT INTO `accounts` (username, password) VALUES('%s', '%s')", EscapedName, EscapedPassword);
                mysql_query(Query);
Reply
#2

You can't use one grave and fail to continue to use them (note, graves are the '`' characters), you need to wrap them around your columns too.

pawn Код:
format(Query, sizeof(Query), "INSERT INTO `accounts` (`username`, `password`) VALUES('%s', '%s')", EscapedName, EscapedPassword);
Reply
#3

Ah, makes sense. Thanks for the reply, Calg00ne.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)