Fix: pgsql compatibility
This commit is contained in:
parent
cfa45be7d4
commit
7bc39b0eaa
@ -102,7 +102,7 @@ class Categorie
|
|||||||
|
|
||||||
$sql = "SELECT fk_categorie_mere";
|
$sql = "SELECT fk_categorie_mere";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."categorie_association";
|
$sql.= " FROM ".MAIN_DB_PREFIX."categorie_association";
|
||||||
$sql.= " WHERE fk_categorie_fille = '".$id."'";
|
$sql.= " WHERE fk_categorie_fille = ".$id;
|
||||||
|
|
||||||
dol_syslog("Categorie::fetch sql=".$sql);
|
dol_syslog("Categorie::fetch sql=".$sql);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
@ -226,7 +226,7 @@ class Categorie
|
|||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
$sql = 'DELETE FROM '.MAIN_DB_PREFIX.'categorie_association';
|
$sql = 'DELETE FROM '.MAIN_DB_PREFIX.'categorie_association';
|
||||||
$sql .= ' WHERE fk_categorie_fille = "'.$this->id.'"';
|
$sql.= ' WHERE fk_categorie_fille = '.$this->id;
|
||||||
|
|
||||||
dol_syslog("Categorie::update sql=".$sql);
|
dol_syslog("Categorie::update sql=".$sql);
|
||||||
if (! $this->db->query($sql))
|
if (! $this->db->query($sql))
|
||||||
@ -239,7 +239,7 @@ class Categorie
|
|||||||
if($this->id_mere !="" && $this->id_mere!=$this->id)
|
if($this->id_mere !="" && $this->id_mere!=$this->id)
|
||||||
{
|
{
|
||||||
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'categorie_association(fk_categorie_mere,fk_categorie_fille)';
|
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'categorie_association(fk_categorie_mere,fk_categorie_fille)';
|
||||||
$sql .= ' VALUES ("'.$this->id_mere.'","'.$this->id.'")';
|
$sql.= ' VALUES ('.$this->id_mere.', '.$this->id.')';
|
||||||
|
|
||||||
dol_syslog("Categorie::update sql=".$sql);
|
dol_syslog("Categorie::update sql=".$sql);
|
||||||
if (! $this->db->query($sql))
|
if (! $this->db->query($sql))
|
||||||
@ -582,7 +582,7 @@ class Categorie
|
|||||||
function get_desc($cate)
|
function get_desc($cate)
|
||||||
{
|
{
|
||||||
$sql = "SELECT description FROM ".MAIN_DB_PREFIX."categorie ";
|
$sql = "SELECT description FROM ".MAIN_DB_PREFIX."categorie ";
|
||||||
$sql .= "WHERE rowid = '".$cate."'";
|
$sql .= "WHERE rowid = ".$cate;
|
||||||
|
|
||||||
$res = $this->db->query($sql);
|
$res = $this->db->query($sql);
|
||||||
$n = $this->db->fetch_array($res);
|
$n = $this->db->fetch_array($res);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user