Just noticed the update method is missing a 'WHERE' clause in the query builder.
public function update($table, array $data, $where = array())
{
(...)
// handle where clause
if (!empty($where)) {
$sql .= " WHERE "; // <-- Needs to be added
if (!$this->_isAssociative($data) || !$this->_isAssociative($where)) {
throw new Exception('Update requires $data and $where to be associative.');
}
(...)
}
Superb class by the way, it's very clean and pragmatic.
Just noticed the update method is missing a 'WHERE' clause in the query builder.
Superb class by the way, it's very clean and pragmatic.