dblayer : allow read with null value
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2891 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -738,7 +738,11 @@ class dblayer
|
|||||||
// name is 'group'
|
// name is 'group'
|
||||||
// Don't put single quotes : don't work with SQLite
|
// Don't put single quotes : don't work with SQLite
|
||||||
// TODO : Test for PostgreSQL (Tested for SQLite and MySQL)
|
// TODO : Test for PostgreSQL (Tested for SQLite and MySQL)
|
||||||
$req .= " $this->sep".$s[0]."$this->sep ".$s[2]." :".md5 ($s[0].$s[1]);
|
if ($s[1] !== null)
|
||||||
|
$req .= " $this->sep".$s[0]."$this->sep ".$s[2]." :".
|
||||||
|
md5 ($s[0].$s[1]);
|
||||||
|
else
|
||||||
|
$req .= " $this->sep".$s[0]."$this->sep IS NULL";
|
||||||
}
|
}
|
||||||
$req .=")";
|
$req .=")";
|
||||||
}
|
}
|
||||||
@@ -795,6 +799,8 @@ class dblayer
|
|||||||
{
|
{
|
||||||
foreach ($select as $s)
|
foreach ($select as $s)
|
||||||
{
|
{
|
||||||
|
if ($s[1] === null)
|
||||||
|
continue;
|
||||||
if ($this->debug) echo "DEBUG BIND : ".$s[0]."(".md5 ($s[0].$s[1]).")->".
|
if ($this->debug) echo "DEBUG BIND : ".$s[0]."(".md5 ($s[0].$s[1]).")->".
|
||||||
var_export ($s[1], TRUE)."\n";
|
var_export ($s[1], TRUE)."\n";
|
||||||
$st->bindValue (":".md5 ($s[0].$s[1]), $s[1]);
|
$st->bindValue (":".md5 ($s[0].$s[1]), $s[1]);
|
||||||
|
|||||||
Reference in New Issue
Block a user