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:
11
dblayer.php
11
dblayer.php
@@ -273,6 +273,8 @@ class dblayer extends PDO
|
|||||||
$st->bindValue (":$key", $val, PDO::PARAM_STR);
|
$st->bindValue (":$key", $val, PDO::PARAM_STR);
|
||||||
elseif ($this->fields[$key][0] === "datetime")
|
elseif ($this->fields[$key][0] === "datetime")
|
||||||
$st->bindValue (":$key", $val, PDO::PARAM_STR);
|
$st->bindValue (":$key", $val, PDO::PARAM_STR);
|
||||||
|
elseif ($this->fields[$key][0] === "date")
|
||||||
|
$st->bindValue (":$key", $val, PDO::PARAM_STR);
|
||||||
else
|
else
|
||||||
throw new Exception ("TO BE DEVELOPPED : ".$this->fields[$key][0], 500);
|
throw new Exception ("TO BE DEVELOPPED : ".$this->fields[$key][0], 500);
|
||||||
$st->execute ();
|
$st->execute ();
|
||||||
@@ -301,6 +303,8 @@ class dblayer extends PDO
|
|||||||
$st->bindValue (":$key", $val, PDO::PARAM_STR);
|
$st->bindValue (":$key", $val, PDO::PARAM_STR);
|
||||||
elseif ($this->fields[$key][0] === "datetime")
|
elseif ($this->fields[$key][0] === "datetime")
|
||||||
$st->bindValue (":$key", $val, PDO::PARAM_STR);
|
$st->bindValue (":$key", $val, PDO::PARAM_STR);
|
||||||
|
elseif ($this->fields[$key][0] === "date")
|
||||||
|
$st->bindValue (":$key", $val, PDO::PARAM_STR);
|
||||||
else
|
else
|
||||||
throw new Exception ("TO BE DEVELOPPED : ".$this->fields[$key][0], 500);
|
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);
|
$st->bindValue (":$key", $val, PDO::PARAM_STR);
|
||||||
elseif ($this->fields[$key][0] === "datetime")
|
elseif ($this->fields[$key][0] === "datetime")
|
||||||
$st->bindValue (":$key", $val, PDO::PARAM_STR);
|
$st->bindValue (":$key", $val, PDO::PARAM_STR);
|
||||||
|
elseif ($this->fields[$key][0] === "date")
|
||||||
|
$st->bindValue (":$key", $val, PDO::PARAM_STR);
|
||||||
else
|
else
|
||||||
throw new Exception ("TO BE DEVELOPPED : ".$this->fields[$key][0], 500);
|
throw new Exception ("TO BE DEVELOPPED : ".$this->fields[$key][0], 500);
|
||||||
$st->execute ();
|
$st->execute ();
|
||||||
@@ -543,6 +549,11 @@ class dblayer extends PDO
|
|||||||
if ($this->debug) echo "(datetime)\n";
|
if ($this->debug) echo "(datetime)\n";
|
||||||
$st->bindValue (":$key", $val, PDO::PARAM_STR);
|
$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
|
else
|
||||||
{
|
{
|
||||||
if ($this->debug) echo "(UNKNOWN)\n";
|
if ($this->debug) echo "(UNKNOWN)\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user