Conventional database table naming convention uses underscore in the column name to separate words (e.g., DATE_OF_BIRTH). However, when I look in the database of a table created by WPDataTables, the name is DATEOFBIRTH.
In the Column Setting, the tooltip for 'Display Name' reads that the display name will be shown instead of the original header. Where do I find the original header?
I'm assuming that I can specify the original header as DATE_OF_BIRTH and make the display name 'Date of Birth'?
I need the column heading in my database to be exactly as I name it, case sensitive. But, the database column name has all underscores removes. For example, if I name a column DATE_OF_BIRTH, this is exactly how it should be named in the database, not DATEOFBIRTH.
Why are underscores removed on the database column name?
That's how the plugin's relation with the database works at the moment, and it can't be changed.
I will forward your suggestion to our development team, and hopefully they'll be able to change it for one of the future updates.
For the time being, you can either create tables directly in the database, and pull them into wpDataTables using SQL queries, or use the original headers without underscores.
Conventional database table naming convention uses underscore in the column name to separate words (e.g., DATE_OF_BIRTH). However, when I look in the database of a table created by WPDataTables, the name is DATEOFBIRTH.
In the Column Setting, the tooltip for 'Display Name' reads that the display name will be shown instead of the original header. Where do I find the original header?
I'm assuming that I can specify the original header as DATE_OF_BIRTH and make the display name 'Date of Birth'?
Thanks,
Perla
Hello Perla
You can see the original header when you access your column's settings:
You can change the Displayed header to whatever you want it to be.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Thanks for getting back to me promptly.
I need the column heading in my database to be exactly as I name it, case sensitive. But, the database column name has all underscores removes. For example, if I name a column DATE_OF_BIRTH, this is exactly how it should be named in the database, not DATEOFBIRTH.
Why are underscores removed on the database column name?
Thanks,
Perla
Just a heads up that I re-installed the latest version of WPDatatables and this issue persists.
DATE_OF_BIRTH (entered header) --> dateofbirth (original header) --> DATEOFBIRTH (database header)
Thanks.
Hi again Perla
That's how the plugin's relation with the database works at the moment, and it can't be changed.
I will forward your suggestion to our development team, and hopefully they'll be able to change it for one of the future updates.
For the time being, you can either create tables directly in the database, and pull them into wpDataTables using SQL queries, or use the original headers without underscores.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables