MySQL Error in the Query?
#1

I am having a problem here, most likely to do with the floats. Does anybody know the problem?

Код:
format(Query, sizeof(Query), "INSERT INTO `accounts` (username, password, level, cash, pos_x, pos_y, pos_z) VALUES('%s', '%s', '%d', '%f', '%f', '%f')", EscapedName, EscapedPassword, 1, 2500, 1742.9363, -1861.8215, 13.5770);
Reply
#2

Anybody?
Reply
#3

pawn Код:
format(Query, sizeof(Query), "INSERT INTO `accounts` (username, password, level, cash, pos_x, pos_y, pos_z) VALUES('%s', '%s', 1, 2500, '1742.9363', '-1861.8215', '13.5770')", EscapedName, EscapedPassword);
Reply
#4

Hmm still didn't work.. Check this...


Код:
[02:55:15] MySQL Error (0): Could not execute query. 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 ''17' at line 1.
[02:55:15] MySQL Error (0): Could not execute query. Unknown column 'biskey' in 'field list'.
[02:55:15] MySQL Error (0): Could not execute query. 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 '0' WHERE `SQLid` = '0'' at line 1.
[02:55:16] MySQL Error (0): Could not execute query. Unknown column 'biskey' in 'field list'.
[02:55:16] MySQL Error (0): Could not execute query. 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 '0' WHERE `SQLid` = '0'' at line 1.
[02:55:18] MySQL Error (0): Could not execute query. Unknown column 'biskey' in 'field list'.
[02:55:18] MySQL Error (0): Could not execute query. 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 '0' WHERE `SQLid` = '0'' at line 1.
Reply
#5

Quote:
Originally Posted by Antonio [G-RP]
Посмотреть сообщение
Hmm still didn't work.. Check this...


Код:
[02:55:15] MySQL Error (0): Could not execute query. 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 ''17' at line 1.
[02:55:15] MySQL Error (0): Could not execute query. Unknown column 'biskey' in 'field list'.
[02:55:15] MySQL Error (0): Could not execute query. 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 '0' WHERE `SQLid` = '0'' at line 1.
[02:55:16] MySQL Error (0): Could not execute query. Unknown column 'biskey' in 'field list'.
[02:55:16] MySQL Error (0): Could not execute query. 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 '0' WHERE `SQLid` = '0'' at line 1.
[02:55:18] MySQL Error (0): Could not execute query. Unknown column 'biskey' in 'field list'.
[02:55:18] MySQL Error (0): Could not execute query. 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 '0' WHERE `SQLid` = '0'' at line 1.
That's your problem, you need to add a biskey named field. I didn't even fix anything related to biskey you're directing me to the wrong query
Reply
#6

Ah my apologies, I spelt it wrong from what it really is. Here is the MAIN errors.

Код:
[02:58:42] MySQL Error (0): Could not execute query. 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 ''17' at line 1.
[02:58:42] MySQL Error (0): Could not execute query. 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 '0' WHERE `SQLid` = '0'' at line 1.
[02:58:43] MySQL Error (0): Could not execute query. 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 '0' WHERE `SQLid` = '0'' at line 1.
[02:58:47] MySQL Error (0): Could not execute query. 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 '0' WHERE `SQLid` = '0'' at line 1.
Reply
#7

There's no SQLid in the query you posted. I can't fix a query that hasn't been posted.
Reply
#8

Must be this.. but because of these errors, I cannot register / create a character.

Код:
format(Query, sizeof(Query), "SELECT `SQLid` FROM `accounts` WHERE `username` = '%s'", EscapedName);
Reply
#9

Any idea's?
Reply
#10

You're still posting the wrong query.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)