dblayer : add date support

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1602 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2014-07-30 12:07:55 +00:00
parent 7afa8bfc54
commit b15d90ce0b

View File

@@ -273,6 +273,8 @@ class dblayer extends PDO
$st->bindValue (":$key", $val, PDO::PARAM_STR);
elseif ($this->fields[$key][0] === "datetime")
$st->bindValue (":$key", $val, PDO::PARAM_STR);
elseif ($this->fields[$key][0] === "date")
$st->bindValue (":$key", $val, PDO::PARAM_STR);
else
throw new Exception ("TO BE DEVELOPPED : ".$this->fields[$key][0], 500);
$st->execute ();
@@ -301,6 +303,8 @@ class dblayer extends PDO
$st->bindValue (":$key", $val, PDO::PARAM_STR);
elseif ($this->fields[$key][0] === "datetime")
$st->bindValue (":$key", $val, PDO::PARAM_STR);
elseif ($this->fields[$key][0] === "date")
$st->bindValue (":$key", $val, PDO::PARAM_STR);
else
throw new Exception ("TO BE DEVELOPPED : ".$this->fields[$key][0], 500);
}
@@ -496,6 +500,8 @@ class dblayer extends PDO
$st->bindValue (":$key", $val, PDO::PARAM_STR);
elseif ($this->fields[$key][0] === "datetime")
$st->bindValue (":$key", $val, PDO::PARAM_STR);
elseif ($this->fields[$key][0] === "date")
$st->bindValue (":$key", $val, PDO::PARAM_STR);
else
throw new Exception ("TO BE DEVELOPPED : ".$this->fields[$key][0], 500);
$st->execute ();
@@ -543,6 +549,11 @@ class dblayer extends PDO
if ($this->debug) echo "(datetime)\n";
$st->bindValue (":$key", $val, PDO::PARAM_STR);
}
elseif ($this->fields[$key][0] === "date")
{
if ($this->debug) echo "(date)\n";
$st->bindValue (":$key", $val, PDO::PARAM_STR);
}
else
{
if ($this->debug) echo "(UNKNOWN)\n";