Update of picoDb

This commit is contained in:
Frederic Guillot 2013-04-22 22:43:38 -04:00
parent 93d1fd40c0
commit 9a947b8eab
1 changed files with 19 additions and 1 deletions

View File

@ -63,7 +63,14 @@ class Table
$this->conditions()
);
return false !== $this->db->execute($sql, $values);
$result = $this->db->execute($sql, $values);
if ($result !== false && $result->rowCount() > 0) {
return true;
}
return false;
}
@ -290,6 +297,17 @@ class Table
}
break;
case 'notin':
if (is_array($arguments[1])) {
$sql = sprintf(
'%s NOT IN (%s)',
$this->db->escapeIdentifier($column),
implode(', ', array_fill(0, count($arguments[1]), '?'))
);
}
break;
case 'like':
$sql = sprintf('%s LIKE ?', $this->db->escapeIdentifier($column));
break;