cakephp: Integers as column names dont work
This is a (multiple allowed):
- bug
- enhancement
- feature-discussion (RFC)
- CakePHP Version: 3.3
- Platform and Target: XAMPP
What you did
Trying to save form data into a database table which has numbers as column names. For example column ‘333’.
Expected Behavior
Cake should wrap ALL column names in column_name (grave accents) like phpMyAdmin would do it to make the insert query work.
Actual Behavior
Cake is not wrapping column names in grave accents so it returns an SQL error while saving if you have a number as column name.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 18 (15 by maintainers)
@mo86 oh come on. That was funny. Programmers have no sense of humor.
I think if we can get CakePHP to support at least the very basics here, we should do it. It would help those migrating. And at least on the quoting part it should be a fix not too hard to do.