I created mysql tables and there I have put some columns.
Now I want to check that a certain column exists in the database via php.
Like this:
You can use mysql_list_fields and mysql_num_fields to get columns of a table
$fields = mysql_list_fields('database_name', 'table_name'); $columns = mysql_num_fields($fields);