Skip to content
Snippets Groups Projects
Commit 3829072b authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Amélioration de la gestion des NULL

parent b5849b5a
No related branches found
No related tags found
No related merge requests found
......@@ -181,7 +181,7 @@ class Table
*
* @return bool
*/
public function delete($where, array $options = []): bool
public function delete($where=null, array $options = []): bool
{
$params = [];
$sql = "DELETE FROM \"$this->name\"" . $this->makeWhere($where, $options, $params);
......@@ -391,7 +391,11 @@ class Table
{
if (!isset($this->transformCache[$transformer][$value])) {
$val = $this->getBdd()->select(sprintf($transformer, ':val'), ['val' => $value]);
if (isset($val[0])){
$this->transformCache[$transformer][$value] = $this->sqlToVal(current($val[0]), $ddl);
}else{
$this->transformCache[$transformer][$value] = null;
}
}
return $this->transformCache[$transformer][$value];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment