MCPcopy Create free account
hub / github.com/EqualifyEverything/equalify / db_column_exists

Method db_column_exists

models/db.php:358–377  ·  view source on GitHub ↗

* DB Column Exists */

(
        $table, $column_name
    )

Source from the content-addressed store, hash-verified

356 * DB Column Exists
357 */
358 public static function db_column_exists(
359 $table, $column_name
360 ){
361
362 // SQL.
363 $sql = 'SELECT '.$column_name.' FROM `
364 '.$table.'` ';
365 $params = array();
366
367 // Query
368 $result = self::query($sql, $params, false);
369
370 // Result
371 if(!$result){
372 return false;
373 }else{
374 return true;
375 }
376
377 }
378
379 /**
380 * Update DB Rows

Callers 1

Calls 1

queryMethod · 0.95

Tested by

no test coverage detected