Last MySQL Row Won't Retrieve.
#1

pawn Код:
new escape[24], query[64];
                    mysql_real_escape_string(inputtext, escape);
                    format(query, sizeof(query), "SELECT `id` FROM `accounts` WHERE `PlayerName` = '%s' LIMIT 1", escape);
                    mysql_query(query);
                    mysql_store_result();
                   
                   
                    printf("rows %d", mysql_num_rows());

                    if(mysql_num_rows() > 0)
                    {
This function works, except for the last row in the table. It returns:

Quote:

[18:03:21] mysql error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''Grant_Reacher' at line 1

in the server log. (That is last name in the TABLE.)
Reply


Messages In This Thread
Last MySQL Row Won't Retrieve. - by Dokins - 12.03.2014, 18:00
Re: Last MySQL Row Won't Retrieve. - by Matess - 12.03.2014, 18:20
Re: Last MySQL Row Won't Retrieve. - by Dokins - 12.03.2014, 18:21
Re: Last MySQL Row Won't Retrieve. - by Matess - 12.03.2014, 18:24
Re: Last MySQL Row Won't Retrieve. - by Dokins - 12.03.2014, 18:25

Forum Jump:


Users browsing this thread: 3 Guest(s)