Hotaru Docs

 [həʊdɒks]

Extra ezSQL Functions

There are three additional functions added to the ezSQL_mysql class:

In /libs/extensions/ezSQL/mysql/ez_sql_mysql.php...

The first checks if a table exists and returns true or false. Call the function like this:

if ($h->db->table_exists('tablename')) { ... do something ... }

The second checks if a table is empty, i.e. it exists but has no rows. It returns true of empty or false otherwise. You can check if a table is empty like this:

if ($h->db->table_empty('tablename')) { ... do something ... }

The third function checks if a column exists and returns true or false. Call the function like this:

if ($h->db->column_exists('tablename', 'columnname')) { ... do something ... }
Getting StartedDesign and LayoutPlugin DevelopmentAdvanced TopicsFunction ReferenceTroubleshooting