google-code-export / ghostplusplus

Automatically exported from code.google.com/p/ghostplusplus
Other
3 stars 0 forks source link

MYSQL field name causing problems #37

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Field "left" in Gameplayers causese problems since it's a reserved word.  
You can't do this for instance.  "select left from gamplayers"  because it 
thinks left is a command rather than a field.  I recommend chaning the 
name of this field for future releases.  

Original issue reported on code.google.com by ico...@gmail.com on 11 Aug 2009 at 6:53

GoogleCodeExporter commented 9 years ago
It's not worth the time to "fix" since it only affects custom queries and 
creates
additional headaches by requiring people to update their schemas and rewrite 
their
PHP statistics programs. I agree that it shouldn't have been done in the first 
place
since it's a reserved word but there is an easy workaround. Enclose the name 
with
backquotes and MySQL will handle it just fine, for example:

SELECT `left` from gameplayers;

Original comment by hogantp on 13 Aug 2009 at 1:25