Cal27
12-20-2008, 06:17 PM
I'm trying to execute the following query:
SELECT `message_id`, `player_guid`,`characters`.`name`, `subject`, `body`, `money`, `attached_item_guids`, `cod`, `stationary`, `delivery_time`, `read_flag` FROM `mailbox`, `characters` WHERE `player_guid` IN (SELECT `guid` FROM `characters` WHERE `acct` = '1' AND `characters`.`guid` = `player_guid`;
but I always get the same error:
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 '' at line 1
I've split up the query on as many lines as possible and still get this error for the very last line. I can't figure out what the problem is (the error message isn't very helpful). It seems like there's some sort of invisible character in there but I've rewritten it several times and it hasn't fixed it.
SELECT `message_id`, `player_guid`,`characters`.`name`, `subject`, `body`, `money`, `attached_item_guids`, `cod`, `stationary`, `delivery_time`, `read_flag` FROM `mailbox`, `characters` WHERE `player_guid` IN (SELECT `guid` FROM `characters` WHERE `acct` = '1' AND `characters`.`guid` = `player_guid`;
but I always get the same error:
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 '' at line 1
I've split up the query on as many lines as possible and still get this error for the very last line. I can't figure out what the problem is (the error message isn't very helpful). It seems like there's some sort of invisible character in there but I've rewritten it several times and it hasn't fixed it.