/** * Fetches the names tables in the database. */ function db_tables() { return db_col("SHOW TABLES"); }
public function get_autocomplete_items($q, $limit = 5) { $sql = 'select iname from ' . $this->table_name . ' where status=0 and iname like ' . dbq('%' . $q . '%') . ' limit ' . $limit; return db_col($sql); }