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

Method delete_db_column

models/db.php:338–353  ·  view source on GitHub ↗

* Add DB Column */

(
        $table, $column_name)

Source from the content-addressed store, hash-verified

336 * Add DB Column
337 */
338 public static function delete_db_column(
339 $table, $column_name){
340
341 // SQL.
342 $sql = 'ALTER TABLE `'.$table.'` ';
343 $sql.= 'DROP COLUMN '.$column_name.';';
344 $params = array();
345
346 // Query
347 $result = self::query($sql, $params, false);
348
349 // Result
350 if(!$result)
351 throw new Exception('Cannot drop "'.$column_name.'" to "'.$table.'"');
352
353 }
354
355 /**
356 * DB Column Exists

Callers

nothing calls this directly

Calls 1

queryMethod · 0.95

Tested by

no test coverage detected