Dirty Butter Posted June 6, 2016 Share Posted June 6, 2016 I was following another thread discussion about checking the INDEX values on CubeCart_inventory, and saw this warning in phpMyadmin. Is this an issue with CubeCart? The column name 'condition' is a MySQL reserved keyword. Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 6, 2016 Share Posted June 6, 2016 I'm sure if CubeCart was not properly enclosing the column name in backticks, that is `condition`, we would have seen much more mayhem caused by it. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 6, 2016 Author Share Posted June 6, 2016 Just trying to learn from this. I don't see any back tics on phpMyadmin screen, and obviously CC is working. Are the back tics used within the CC code? Is that where they show up? Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 6, 2016 Share Posted June 6, 2016 In the file /classes/db/database.class.php, it is the responsibility of this code to identify column names and use backticks appropriately. You will see them being applied in function count(), delete(), getFullTextIndex(), and others. Backticks are also used to enclose names of tables. Of note, there are two functions where it is the responsibility of the programmer to properly construct the query, as these functions execute the query straightaway: misc(), and query(). So, phpMyAdmin may take your query, run it through a parser, and make sure column names are safened. There is no way I would actually know for sure, other than making this assumption due to the popularity of this application. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 6, 2016 Author Share Posted June 6, 2016 Thanks for the explanation. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.