I have a simple query “SELECT virtual FROM groups”. Works in my Windows/Xampp/PHP7/MySQL (5.6) local setup, but in Percona (5.7) on Bluehost, but it rejects the field word “virtual”. I have to use the “SELECT groups.virtual AS virtualx FROM groups” to make it work. This is through PHPMyAdmin interface. The error it provides is - An expression was expected. (near virtual) Unrecognized keyword. (near virtual). Can anyone confirm this is a bug in Percona or provide an explanation? I can’t make sense of it otherwise.
Dear @hder
VIRTUAL was added as reserved keyword in MySQL 5.7
https://dev.mysql.com/doc/refman/5.7/en/keywords.html#keywords-5-7-detailed-V
I would avoid using keywords as column names but if you have you you can refer to them by using backticks
select `virtual' from groups; should work.