Jump to content

Question

Posted

Please deem it necessary to move this topic if needed.

I'm having this 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 'query_sql "SELECT `char`.char_id,`char`.`name`,global_reg_value.`value` FROM glo' at line 1

when I run this on the database.

query_sql "SELECT `char`.char_id,`char`.`name`,global_reg_value.`value` FROM global_reg_value LEFT JOIN `char` ON global_reg_value.char_id=`char`.char_id WHERE global_reg_value.str='brokeemp' ORDER BY CAST(`global_reg_value`.`value` AS UNSIGNED) DESC LIMIT 10", .@char_id, .@name$, .@count;

On my Breaker Ladder, and it does not store any value in my database.

What is wrong with it? Thank you for the help.

1 answer to this question

Recommended Posts

Posted

You need to have ` marks around each table name. Try this:

query_sql "SELECT `char`.`char_id`,`char`.`name`,`global_reg_value`.`value` FROM `global_reg_value` LEFT JOIN `char` ON `global_reg_value`.`char_id`=`char`.`char_id` WHERE `global_reg_value`.`str`='brokeemp' ORDER BY CAST(`global_reg_value`.`value` AS UNSIGNED) DESC LIMIT 10", .@char_id, .@name$, .@count;

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...