* Add DB Column */
(
$table, $column_name)
| 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 |