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

by kade.hermiston , in category: Technology , 4 years 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 , 4 years 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...
}


Related Threads:

How to check the version of CodeIgniter framework?
How to Maintain a Propane Grill to Last Longer in 2025?
What Are the Key Features That Make Codeigniter Ideal for Rapid Php Application Development?
What Are the Best Practices for Managing Oracle Sql Databases?
What do you mean by index in a table?
What is table naming convention in Prestashop?