How to check a field or column exists in a table or not in Codeigniter?

Member

kade.hermiston

by kade.hermiston , in category: Technology , a month ago

How to check a field or column exists in a table or not in Codeigniter?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by cristobal , a month ago

Code for Checking a field or column exists or not in a Codeigniter table.

1
2
3
4
if ($this->db->field_exists('field_name', 'table_name'))
{
        // some code...
}