kack kack - 6 months ago 22
MySQL Question

Table column name with regular expression using mysql

Please let me know is that possible i am use regular expression or another idea to set query like,

select name_en,name_ar,desc_en,desc_ar from table_name


in above query i need to write all column name but should be required directly
column name have _en or _ar not want to specify all column name.

Answer

Please try with mysql_list_fields() function and get your fields name from the table.