|
@@ 474-483 (lines=10) @@
|
| 471 |
|
* @throws DatabaseException |
| 472 |
|
* @return boolean |
| 473 |
|
*/ |
| 474 |
|
public function delete($table, $where = null, array $params = array()) |
| 475 |
|
{ |
| 476 |
|
$sql = "DELETE FROM `$table`"; |
| 477 |
|
|
| 478 |
|
if (!is_null($where)) { |
| 479 |
|
$sql .= " WHERE $where"; |
| 480 |
|
} |
| 481 |
|
|
| 482 |
|
return MySQL::$_conn_pdo->delete($sql, $params); |
| 483 |
|
} |
| 484 |
|
|
| 485 |
|
/** |
| 486 |
|
* Returns an associative array that contains the results of the |
|
@@ 507-514 (lines=8) @@
|
| 504 |
|
* @return array |
| 505 |
|
* An associative array with the column names as the keys |
| 506 |
|
*/ |
| 507 |
|
public function fetch($query = null, $index_by_column = null, array $params = array(), array $values = array()) |
| 508 |
|
{ |
| 509 |
|
if(!is_null($index_by_column)) { |
| 510 |
|
$params['index'] = $index_by_column; |
| 511 |
|
} |
| 512 |
|
|
| 513 |
|
return MySQL::$_conn_pdo->fetch($query, $params, $values); |
| 514 |
|
} |
| 515 |
|
|
| 516 |
|
/** |
| 517 |
|
* Returns the row at the specified index from the given query. If no |