mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 17:48:25 +01:00
Removed SQL string from call debug log
This commit is contained in:
@@ -158,7 +158,7 @@ class Categorie extends CommonObject
|
|||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::create sql='.$sql);
|
dol_syslog(get_class($this).'::create', LOG_DEBUG);
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."categorie (";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."categorie (";
|
||||||
$sql.= "fk_parent,";
|
$sql.= "fk_parent,";
|
||||||
$sql.= " label,";
|
$sql.= " label,";
|
||||||
@@ -472,7 +472,7 @@ class Categorie extends CommonObject
|
|||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."categorie_".$type." (fk_categorie, fk_".$column_name.")";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."categorie_".$type." (fk_categorie, fk_".$column_name.")";
|
||||||
$sql .= " VALUES (".$this->id.", ".$obj->id.")";
|
$sql .= " VALUES (".$this->id.", ".$obj->id.")";
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::add_type sql='.$sql);
|
dol_syslog(get_class($this).'::add_type', LOG_DEBUG);
|
||||||
if ($this->db->query($sql))
|
if ($this->db->query($sql))
|
||||||
{
|
{
|
||||||
if (! empty($conf->global->CATEGORIE_RECURSIV_ADD))
|
if (! empty($conf->global->CATEGORIE_RECURSIV_ADD))
|
||||||
@@ -567,7 +567,7 @@ class Categorie extends CommonObject
|
|||||||
$sql .= " WHERE fk_categorie = ".$this->id;
|
$sql .= " WHERE fk_categorie = ".$this->id;
|
||||||
$sql .= " AND fk_".$column_name." = ".$obj->id;
|
$sql .= " AND fk_".$column_name." = ".$obj->id;
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::del_type sql='.$sql);
|
dol_syslog(get_class($this).'::del_type', LOG_DEBUG);
|
||||||
if ($this->db->query($sql))
|
if ($this->db->query($sql))
|
||||||
{
|
{
|
||||||
// Save object we want to unlink category off into category instance to provide information to trigger
|
// Save object we want to unlink category off into category instance to provide information to trigger
|
||||||
@@ -1136,7 +1136,7 @@ class Categorie extends CommonObject
|
|||||||
$sql.= " WHERE ct.fk_categorie = c.rowid AND ct.fk_".$table." = ".$id." AND c.type = ".$typeid;
|
$sql.= " WHERE ct.fk_categorie = c.rowid AND ct.fk_".$table." = ".$id." AND c.type = ".$typeid;
|
||||||
$sql.= " AND c.entity IN (".getEntity('category',1).")";
|
$sql.= " AND c.entity IN (".getEntity('category',1).")";
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::containing sql='.$sql);
|
dol_syslog(get_class($this).'::containing', LOG_DEBUG);
|
||||||
$res = $this->db->query($sql);
|
$res = $this->db->query($sql);
|
||||||
if ($res)
|
if ($res)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
|||||||
$sql.= $db->order($sortfield,$sortorder);
|
$sql.= $db->order($sortfield,$sortorder);
|
||||||
$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
||||||
|
|
||||||
dol_syslog('comm/list.php: sql='.$sql,LOG_DEBUG);
|
dol_syslog('comm/list.php:', LOG_DEBUG);
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1327,7 +1327,7 @@ class Propal extends CommonObject
|
|||||||
$sql.= " fk_statut = 1, date_valid='".$this->db->idate($now)."', fk_user_valid=".$user->id;
|
$sql.= " fk_statut = 1, date_valid='".$this->db->idate($now)."', fk_user_valid=".$user->id;
|
||||||
$sql.= " WHERE rowid = ".$this->id." AND fk_statut = 0";
|
$sql.= " WHERE rowid = ".$this->id." AND fk_statut = 0";
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::valid sql='.$sql);
|
dol_syslog(get_class($this).'::valid', LOG_DEBUG);
|
||||||
if ($this->db->query($sql))
|
if ($this->db->query($sql))
|
||||||
{
|
{
|
||||||
if (! $notrigger)
|
if (! $notrigger)
|
||||||
@@ -2633,7 +2633,7 @@ class Propal extends CommonObject
|
|||||||
$sql.= ' WHERE pt.fk_propal = '.$this->id;
|
$sql.= ' WHERE pt.fk_propal = '.$this->id;
|
||||||
$sql.= ' ORDER BY pt.rang ASC, pt.rowid';
|
$sql.= ' ORDER BY pt.rang ASC, pt.rowid';
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::getLinesArray sql='.$sql,LOG_DEBUG);
|
dol_syslog(get_class($this).'::getLinesArray', LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
@@ -2921,7 +2921,7 @@ class PropaleLigne extends CommonObject
|
|||||||
$sql.= " ".(! empty($this->date_end)?"'".$this->db->idate($this->date_end)."'":"null");
|
$sql.= " ".(! empty($this->date_end)?"'".$this->db->idate($this->date_end)."'":"null");
|
||||||
$sql.= ')';
|
$sql.= ')';
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::insert sql='.$sql, LOG_DEBUG);
|
dol_syslog(get_class($this).'::insert', LOG_DEBUG);
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -233,7 +233,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
|||||||
$sql.= " ORDER BY $sortfield $sortorder, s.nom ASC";
|
$sql.= " ORDER BY $sortfield $sortorder, s.nom ASC";
|
||||||
$sql.= $db->plimit($conf->liste_limit+1, $offset);
|
$sql.= $db->plimit($conf->liste_limit+1, $offset);
|
||||||
|
|
||||||
dol_syslog('comm/prospect/list.php sql='.$sql,LOG_DEBUG);
|
dol_syslog('comm/prospect/list.php', LOG_DEBUG);
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ $sql.= $db->order($sortfield,$sortorder);
|
|||||||
$sql.= $db->plimit($limit+1,$offset);
|
$sql.= $db->plimit($limit+1,$offset);
|
||||||
//print $sql;
|
//print $sql;
|
||||||
|
|
||||||
dol_syslog('compta/bank/search.php:: sql='.$sql);
|
dol_syslog('compta/bank/search.php::', LOG_DEBUG);
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -415,7 +415,7 @@ class Deplacement extends CommonObject
|
|||||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'deplacement as c';
|
$sql.= ' FROM '.MAIN_DB_PREFIX.'deplacement as c';
|
||||||
$sql.= ' WHERE c.rowid = '.$id;
|
$sql.= ' WHERE c.rowid = '.$id;
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::info sql='.$sql);
|
dol_syslog(get_class($this).'::info', LOG_DEBUG);
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
|
|
||||||
if ($result)
|
if ($result)
|
||||||
|
|||||||
@@ -955,7 +955,7 @@ class Facture extends CommonInvoice
|
|||||||
$sql.= ' WHERE l.fk_facture = '.$this->id;
|
$sql.= ' WHERE l.fk_facture = '.$this->id;
|
||||||
$sql.= ' ORDER BY l.rang';
|
$sql.= ' ORDER BY l.rang';
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::fetch_lines sql='.$sql, LOG_DEBUG);
|
dol_syslog(get_class($this).'::fetch_lines', LOG_DEBUG);
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ class Paiement extends CommonObject
|
|||||||
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'paiement_facture (fk_facture, fk_paiement, amount)';
|
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'paiement_facture (fk_facture, fk_paiement, amount)';
|
||||||
$sql .= ' VALUES ('.$facid.', '. $this->id.', \''.$amount.'\')';
|
$sql .= ' VALUES ('.$facid.', '. $this->id.', \''.$amount.'\')';
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::Create Amount line '.$key.' insert paiement_facture sql='.$sql);
|
dol_syslog(get_class($this).'::Create Amount line '.$key.' insert paiement_facture', LOG_DEBUG);
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
@@ -553,7 +553,7 @@ class Paiement extends CommonObject
|
|||||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' set fk_bank = '.$id_bank;
|
$sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' set fk_bank = '.$id_bank;
|
||||||
$sql.= ' WHERE rowid = '.$this->id;
|
$sql.= ' WHERE rowid = '.$this->id;
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::update_fk_bank sql='.$sql);
|
dol_syslog(get_class($this).'::update_fk_bank', LOG_DEBUG);
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
@@ -639,7 +639,7 @@ class Paiement extends CommonObject
|
|||||||
{
|
{
|
||||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' SET statut = 1 WHERE rowid = '.$this->id;
|
$sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' SET statut = 1 WHERE rowid = '.$this->id;
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::valide sql='.$sql);
|
dol_syslog(get_class($this).'::valide', LOG_DEBUG);
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
@@ -663,7 +663,7 @@ class Paiement extends CommonObject
|
|||||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'paiement as p';
|
$sql.= ' FROM '.MAIN_DB_PREFIX.'paiement as p';
|
||||||
$sql.= ' WHERE p.rowid = '.$id;
|
$sql.= ' WHERE p.rowid = '.$id;
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::info sql='.$sql);
|
dol_syslog(get_class($this).'::info', LOG_DEBUG);
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
|
|
||||||
if ($result)
|
if ($result)
|
||||||
@@ -726,7 +726,7 @@ class Paiement extends CommonObject
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$this->db->error();
|
$this->error=$this->db->error();
|
||||||
dol_syslog(get_class($this).'::getBillsArray Error '.$this->error.' - sql='.$sql);
|
dol_syslog(get_class($this).'::getBillsArray Error '.$this->error.' -', LOG_DEBUG);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ class box_ficheinter extends ModeleBoxes
|
|||||||
$sql.= " ORDER BY f.tms DESC";
|
$sql.= " ORDER BY f.tms DESC";
|
||||||
$sql.= $db->plimit($max, 0);
|
$sql.= $db->plimit($max, 0);
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::loadBox sql='.$sql,LOG_DEBUG);
|
dol_syslog(get_class($this).'::loadBox', LOG_DEBUG);
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -653,7 +653,7 @@ abstract class CommonObject
|
|||||||
$sql = "SELECT rowid, code, libelle as label, coder";
|
$sql = "SELECT rowid, code, libelle as label, coder";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_barcode_type";
|
$sql.= " FROM ".MAIN_DB_PREFIX."c_barcode_type";
|
||||||
$sql.= " WHERE rowid = ".$idtype;
|
$sql.= " WHERE rowid = ".$idtype;
|
||||||
dol_syslog(get_class($this).'::fetch_barcode sql='.$sql);
|
dol_syslog(get_class($this).'::fetch_barcode', LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
@@ -739,7 +739,7 @@ abstract class CommonObject
|
|||||||
$sql.= " WHERE ".$field." = '".$key."'";
|
$sql.= " WHERE ".$field." = '".$key."'";
|
||||||
$sql.= " AND entity = ".$conf->entity;
|
$sql.= " AND entity = ".$conf->entity;
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::fetchObjectFrom sql='.$sql);
|
dol_syslog(get_class($this).'::fetchObjectFrom', LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
@@ -765,7 +765,7 @@ abstract class CommonObject
|
|||||||
$sql = "SELECT ".$field." FROM ".MAIN_DB_PREFIX.$table;
|
$sql = "SELECT ".$field." FROM ".MAIN_DB_PREFIX.$table;
|
||||||
$sql.= " WHERE rowid = ".$id;
|
$sql.= " WHERE rowid = ".$id;
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::getValueFrom sql='.$sql);
|
dol_syslog(get_class($this).'::getValueFrom', LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
@@ -2484,7 +2484,7 @@ abstract class CommonObject
|
|||||||
$sql.= " FROM ".MAIN_DB_PREFIX.$this->table_element."det";
|
$sql.= " FROM ".MAIN_DB_PREFIX.$this->table_element."det";
|
||||||
$sql.= " WHERE ".$this->fk_element." = ".$this->id;
|
$sql.= " WHERE ".$this->fk_element." = ".$this->id;
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::getTotalDiscount sql='.$sql);
|
dol_syslog(get_class($this).'::getTotalDiscount', LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -399,7 +399,7 @@ class ExtraFields
|
|||||||
{
|
{
|
||||||
$sql="ALTER TABLE ".MAIN_DB_PREFIX.$table." DROP INDEX uk_".$table."_".$attrname;
|
$sql="ALTER TABLE ".MAIN_DB_PREFIX.$table." DROP INDEX uk_".$table."_".$attrname;
|
||||||
}
|
}
|
||||||
dol_syslog(get_class($this).'::update sql='.$sql);
|
dol_syslog(get_class($this).'::update', LOG_DEBUG);
|
||||||
$resql=$this->db->query($sql,1,'dml');
|
$resql=$this->db->query($sql,1,'dml');
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -754,7 +754,7 @@ class ExtraFields
|
|||||||
$sql.=preg_replace('/^ AND /','',$sqlwhere);
|
$sql.=preg_replace('/^ AND /','',$sqlwhere);
|
||||||
//print $sql;
|
//print $sql;
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::showInputField type=sellist sql='.$sql);
|
dol_syslog(get_class($this).'::showInputField type=sellist', LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
@@ -964,7 +964,7 @@ class ExtraFields
|
|||||||
$sql.= " WHERE ".$selectkey."='".$this->db->escape($value)."'";
|
$sql.= " WHERE ".$selectkey."='".$this->db->escape($value)."'";
|
||||||
//$sql.= ' AND entity = '.$conf->entity;
|
//$sql.= ' AND entity = '.$conf->entity;
|
||||||
|
|
||||||
dol_syslog(get_class($this).':showOutputField:$type=sellist sql='.$sql);
|
dol_syslog(get_class($this).':showOutputField:$type=sellist', LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -604,7 +604,7 @@ class Form
|
|||||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_type_fees as c";
|
$sql.= " FROM ".MAIN_DB_PREFIX."c_type_fees as c";
|
||||||
$sql.= " ORDER BY lower(c.libelle) ASC";
|
$sql.= " ORDER BY lower(c.libelle) ASC";
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::load_cache_types_fees sql='.$sql, LOG_DEBUG);
|
dol_syslog(get_class($this).'::load_cache_types_fees', LOG_DEBUG);
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
@@ -1554,7 +1554,7 @@ class Form
|
|||||||
$sql.= " ORDER BY date_price";
|
$sql.= " ORDER BY date_price";
|
||||||
$sql.= " DESC LIMIT 1";
|
$sql.= " DESC LIMIT 1";
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::constructProductListOption search price for level '.$price_level.' sql='.$sql);
|
dol_syslog(get_class($this).'::constructProductListOption search price for level '.$price_level.'', LOG_DEBUG);
|
||||||
$result2 = $this->db->query($sql);
|
$result2 = $this->db->query($sql);
|
||||||
if ($result2)
|
if ($result2)
|
||||||
{
|
{
|
||||||
@@ -2055,7 +2055,7 @@ class Form
|
|||||||
$sql.= " FROM ".MAIN_DB_PREFIX.'c_payment_term';
|
$sql.= " FROM ".MAIN_DB_PREFIX.'c_payment_term';
|
||||||
$sql.= " WHERE active=1";
|
$sql.= " WHERE active=1";
|
||||||
$sql.= " ORDER BY sortorder";
|
$sql.= " ORDER BY sortorder";
|
||||||
dol_syslog(get_class($this).'::load_cache_conditions_paiements sql='.$sql,LOG_DEBUG);
|
dol_syslog(get_class($this).'::load_cache_conditions_paiements', LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
@@ -2094,7 +2094,7 @@ class Form
|
|||||||
$sql.= " FROM ".MAIN_DB_PREFIX.'c_availability';
|
$sql.= " FROM ".MAIN_DB_PREFIX.'c_availability';
|
||||||
$sql.= " WHERE active=1";
|
$sql.= " WHERE active=1";
|
||||||
$sql.= " ORDER BY rowid";
|
$sql.= " ORDER BY rowid";
|
||||||
dol_syslog(get_class($this).'::load_cache_availability sql='.$sql,LOG_DEBUG);
|
dol_syslog(get_class($this).'::load_cache_availability', LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ class FormCompany
|
|||||||
$sql.= " WHERE active = 1";
|
$sql.= " WHERE active = 1";
|
||||||
if ($filter) $sql.=" ".$filter;
|
if ($filter) $sql.=" ".$filter;
|
||||||
$sql.= " ORDER by id";
|
$sql.= " ORDER by id";
|
||||||
dol_syslog(get_class($this).'::typent_array sql='.$sql,LOG_DEBUG);
|
dol_syslog(get_class($this).'::typent_array', LOG_DEBUG);
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
@@ -104,7 +104,7 @@ class FormCompany
|
|||||||
$sql.= " WHERE active = 1";
|
$sql.= " WHERE active = 1";
|
||||||
if ($filter) $sql.=" ".$filter;
|
if ($filter) $sql.=" ".$filter;
|
||||||
$sql .= " ORDER BY id ASC";
|
$sql .= " ORDER BY id ASC";
|
||||||
dol_syslog(get_class($this).'::effectif_array sql='.$sql,LOG_DEBUG);
|
dol_syslog(get_class($this).'::effectif_array', LOG_DEBUG);
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ class FormOther
|
|||||||
$sql.= " WHERE e.active = 1 AND e.fk_pays = p.rowid";
|
$sql.= " WHERE e.active = 1 AND e.fk_pays = p.rowid";
|
||||||
$sql.= " ORDER BY pays, e.organization ASC, e.code ASC";
|
$sql.= " ORDER BY pays, e.organization ASC, e.code ASC";
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::select_ecotaxes sql='.$sql);
|
dol_syslog(get_class($this).'::select_ecotaxes', LOG_DEBUG);
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
@@ -227,7 +227,7 @@ class FormOther
|
|||||||
$sql.= " WHERE r.active = 1 AND r.fk_pays = p.rowid";
|
$sql.= " WHERE r.active = 1 AND r.fk_pays = p.rowid";
|
||||||
$sql.= " AND p.code = '".$country_code."'";
|
$sql.= " AND p.code = '".$country_code."'";
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::select_revenue_stamp sql='.$sql);
|
dol_syslog(get_class($this).'::select_revenue_stamp', LOG_DEBUG);
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ class FormProjets
|
|||||||
$sql.= ' AND entity='.$conf->entity;
|
$sql.= ' AND entity='.$conf->entity;
|
||||||
$sql.= " ORDER BY ref DESC";
|
$sql.= " ORDER BY ref DESC";
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::select_element sql='.$sql,LOG_DEBUG);
|
dol_syslog(get_class($this).'::select_element', LOG_DEBUG);
|
||||||
|
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
|
|||||||
@@ -674,7 +674,7 @@ class Translate
|
|||||||
$sql = "SELECT ".$fieldlabel." as label";
|
$sql = "SELECT ".$fieldlabel." as label";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX.$tablename;
|
$sql.= " FROM ".MAIN_DB_PREFIX.$tablename;
|
||||||
$sql.= " WHERE ".$fieldkey." = '".($keyforselect?$keyforselect:$key)."'";
|
$sql.= " WHERE ".$fieldkey." = '".($keyforselect?$keyforselect:$key)."'";
|
||||||
dol_syslog(get_class($this).'::getLabelFromKey sql='.$sql,LOG_DEBUG);
|
dol_syslog(get_class($this).'::getLabelFromKey', LOG_DEBUG);
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
@@ -754,7 +754,7 @@ class Translate
|
|||||||
if (! empty($currency_code)) $sql.=" AND code_iso = '".$currency_code."'";
|
if (! empty($currency_code)) $sql.=" AND code_iso = '".$currency_code."'";
|
||||||
//$sql.= " ORDER BY code_iso ASC"; // Not required, a sort is done later
|
//$sql.= " ORDER BY code_iso ASC"; // Not required, a sort is done later
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::loadCacheCurrencies sql='.$sql, LOG_DEBUG);
|
dol_syslog(get_class($this).'::loadCacheCurrencies', LOG_DEBUG);
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -372,7 +372,8 @@ class DoliDBMssql extends DoliDB
|
|||||||
$this->lastqueryerror = $query;
|
$this->lastqueryerror = $query;
|
||||||
$this->lasterror = $this->error();
|
$this->lasterror = $this->error();
|
||||||
$this->lasterrno = $row["code"];
|
$this->lasterrno = $row["code"];
|
||||||
dol_syslog(get_class($this)."::query SQL error: ".$query, LOG_ERROR);
|
|
||||||
|
dol_syslog(get_class($this)."::query SQL error: ".$this->lasterror." (".$this->lasterrno.")", LOG_ERROR);
|
||||||
}
|
}
|
||||||
$this->lastquery=$query;
|
$this->lastquery=$query;
|
||||||
$this->_results = $ret;
|
$this->_results = $ret;
|
||||||
|
|||||||
@@ -273,7 +273,9 @@ class DoliDBMysql extends DoliDB
|
|||||||
$this->lastqueryerror = $query;
|
$this->lastqueryerror = $query;
|
||||||
$this->lasterror = $this->error();
|
$this->lasterror = $this->error();
|
||||||
$this->lasterrno = $this->errno();
|
$this->lasterrno = $this->errno();
|
||||||
dol_syslog(get_class($this)."::query SQL error: ".$query." ".$this->lasterrno, LOG_ERROR);
|
|
||||||
|
dol_syslog(get_class($this)."::query SQL Error query: ".$query, LOG_ERROR);
|
||||||
|
dol_syslog(get_class($this)."::query SQL Error message: ".$this->lasterror." (".$this->lasterrno.")", LOG_ERROR);
|
||||||
}
|
}
|
||||||
$this->lastquery=$query;
|
$this->lastquery=$query;
|
||||||
$this->_results = $ret;
|
$this->_results = $ret;
|
||||||
@@ -829,21 +831,14 @@ class DoliDBMysql extends DoliDB
|
|||||||
{
|
{
|
||||||
if ($this->lasterrno != 'DB_ERROR_USER_ALREADY_EXISTS')
|
if ($this->lasterrno != 'DB_ERROR_USER_ALREADY_EXISTS')
|
||||||
{
|
{
|
||||||
dol_syslog(get_class($this)."::DDLCreateUser sql=".$sql, LOG_ERR);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
// If user already exists, we continue to set permissions
|
|
||||||
dol_syslog(get_class($this)."::DDLCreateUser sql=".$sql, LOG_WARNING);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
$sql = "GRANT ALL PRIVILEGES ON ".$this->escape($dolibarr_main_db_name).".* TO '".$this->escape($dolibarr_main_db_user)."'@'".$this->escape($dolibarr_main_db_host)."' IDENTIFIED BY '".$this->escape($dolibarr_main_db_pass)."'";
|
$sql = "GRANT ALL PRIVILEGES ON ".$this->escape($dolibarr_main_db_name).".* TO '".$this->escape($dolibarr_main_db_user)."'@'".$this->escape($dolibarr_main_db_host)."' IDENTIFIED BY '".$this->escape($dolibarr_main_db_pass)."'";
|
||||||
dol_syslog(get_class($this)."::DDLCreateUser", LOG_DEBUG); // No sql to avoid password in log
|
dol_syslog(get_class($this)."::DDLCreateUser", LOG_DEBUG); // No sql to avoid password in log
|
||||||
$resql=$this->query($sql);
|
$resql=$this->query($sql);
|
||||||
if (! $resql)
|
if (! $resql)
|
||||||
{
|
{
|
||||||
dol_syslog(get_class($this)."::DDLCreateUser sql=".$sql, LOG_ERR);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -853,7 +848,6 @@ class DoliDBMysql extends DoliDB
|
|||||||
$resql=$this->query($sql);
|
$resql=$this->query($sql);
|
||||||
if (! $resql)
|
if (! $resql)
|
||||||
{
|
{
|
||||||
dol_syslog(get_class($this)."::DDLCreateUser sql=".$sql, LOG_ERR);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -275,7 +275,8 @@ class DoliDBMysqli extends DoliDB
|
|||||||
$this->lastqueryerror = $query;
|
$this->lastqueryerror = $query;
|
||||||
$this->lasterror = $this->error();
|
$this->lasterror = $this->error();
|
||||||
$this->lasterrno = $this->errno();
|
$this->lasterrno = $this->errno();
|
||||||
dol_syslog(get_class($this)."::query SQL error: ".$query." ".$this->lasterrno, LOG_ERROR);
|
|
||||||
|
dol_syslog(get_class($this)."::query SQL error: ".$this->lasterror." (".$this->lasterrno.")", LOG_ERROR);
|
||||||
}
|
}
|
||||||
$this->lastquery=$query;
|
$this->lastquery=$query;
|
||||||
$this->_results = $ret;
|
$this->_results = $ret;
|
||||||
@@ -833,21 +834,14 @@ class DoliDBMysqli extends DoliDB
|
|||||||
{
|
{
|
||||||
if ($this->lasterrno != 'DB_ERROR_USER_ALREADY_EXISTS')
|
if ($this->lasterrno != 'DB_ERROR_USER_ALREADY_EXISTS')
|
||||||
{
|
{
|
||||||
dol_syslog(get_class($this)."::DDLCreateUser sql=".$sql, LOG_ERR);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
// If user already exists, we continue to set permissions
|
|
||||||
dol_syslog(get_class($this)."::DDLCreateUser sql=".$sql, LOG_WARNING);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
$sql = "GRANT ALL PRIVILEGES ON ".$this->escape($dolibarr_main_db_name).".* TO '".$this->escape($dolibarr_main_db_user)."'@'".$this->escape($dolibarr_main_db_host)."' IDENTIFIED BY '".$this->escape($dolibarr_main_db_pass)."'";
|
$sql = "GRANT ALL PRIVILEGES ON ".$this->escape($dolibarr_main_db_name).".* TO '".$this->escape($dolibarr_main_db_user)."'@'".$this->escape($dolibarr_main_db_host)."' IDENTIFIED BY '".$this->escape($dolibarr_main_db_pass)."'";
|
||||||
dol_syslog(get_class($this)."::DDLCreateUser", LOG_DEBUG); // No sql to avoid password in log
|
dol_syslog(get_class($this)."::DDLCreateUser", LOG_DEBUG); // No sql to avoid password in log
|
||||||
$resql=$this->query($sql);
|
$resql=$this->query($sql);
|
||||||
if (! $resql)
|
if (! $resql)
|
||||||
{
|
{
|
||||||
dol_syslog(get_class($this)."::DDLCreateUser sql=".$sql, LOG_ERR);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -857,7 +851,6 @@ class DoliDBMysqli extends DoliDB
|
|||||||
$resql=$this->query($sql);
|
$resql=$this->query($sql);
|
||||||
if (! $resql)
|
if (! $resql)
|
||||||
{
|
{
|
||||||
dol_syslog(get_class($this)."::DDLCreateUser sql=".$sql, LOG_ERR);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -506,9 +506,7 @@ class DoliDBPgsql extends DoliDB
|
|||||||
$this->lasterror = $this->error();
|
$this->lasterror = $this->error();
|
||||||
$this->lasterrno = $this->errno();
|
$this->lasterrno = $this->errno();
|
||||||
}
|
}
|
||||||
dol_syslog(get_class($this)."::query SQL error usesavepoint = ".$usesavepoint." - ".$query." - ".pg_last_error($this->db)." => ".$this->errno(), LOG_ERROR);
|
dol_syslog(get_class($this)."::query SQL error usesavepoint = ".$usesavepoint." - ".$this->lasterror." (".$this->lasterrno.")", LOG_ERROR);
|
||||||
//print "\n>> ".$query."<br>\n";
|
|
||||||
//print '>> '.$this->lasterrno.' - '.$this->lasterror.' - '.$this->lastqueryerror."<br>\n";
|
|
||||||
|
|
||||||
if ($usesavepoint && $this->transaction_opened) // Warning, after that errno will be erased
|
if ($usesavepoint && $this->transaction_opened) // Warning, after that errno will be erased
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -409,8 +409,14 @@ class DoliDBSqlite extends DoliDB
|
|||||||
$this->lastqueryerror = $query;
|
$this->lastqueryerror = $query;
|
||||||
$this->lasterror = $this->error();
|
$this->lasterror = $this->error();
|
||||||
$this->lasterrno = $this->errno();
|
$this->lasterrno = $this->errno();
|
||||||
if (preg_match('/[0-9]/',$this->lasterrno)) dol_syslog(get_class($this)."::query SQL error: ".$query." ".$this->lasterrno." ".$this->lasterror, LOG_ERROR);
|
|
||||||
else dol_syslog(get_class($this)."::query SQL error: ".$query." ".$this->lasterrno, LOG_ERROR);
|
$errormsg = get_class($this)."::query SQL error: ".$this->lasterror;
|
||||||
|
|
||||||
|
if (preg_match('/[0-9]/',$this->lasterrno)) {
|
||||||
|
$errormsg .= ' ('.$this->lasterrno.')';
|
||||||
|
}
|
||||||
|
|
||||||
|
dol_syslog($errormsg, LOG_ERROR);
|
||||||
}
|
}
|
||||||
$this->lastquery=$query;
|
$this->lastquery=$query;
|
||||||
$this->_results = $ret;
|
$this->_results = $ret;
|
||||||
@@ -972,7 +978,6 @@ class DoliDBSqlite extends DoliDB
|
|||||||
$resql=$this->query($sql);
|
$resql=$this->query($sql);
|
||||||
if (! $resql)
|
if (! $resql)
|
||||||
{
|
{
|
||||||
dol_syslog(get_class($this)."::DDLCreateUser sql=".$sql, LOG_ERR);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -985,7 +990,6 @@ class DoliDBSqlite extends DoliDB
|
|||||||
$resql=$this->query($sql);
|
$resql=$this->query($sql);
|
||||||
if (! $resql)
|
if (! $resql)
|
||||||
{
|
{
|
||||||
dol_syslog(get_class($this)."::DDLCreateUser sql=".$sql, LOG_ERR);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -995,7 +999,6 @@ class DoliDBSqlite extends DoliDB
|
|||||||
$resql=$this->query($sql);
|
$resql=$this->query($sql);
|
||||||
if (! $resql)
|
if (! $resql)
|
||||||
{
|
{
|
||||||
dol_syslog(get_class($this)."::DDLCreateUser sql=".$sql, LOG_ERR);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -655,7 +655,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
|||||||
if ($search_name) $sql .= " AND (p.lastname LIKE '%".$db->escape($search_name)."%' OR p.firstname LIKE '%".$db->escape($search_name)."%')";
|
if ($search_name) $sql .= " AND (p.lastname LIKE '%".$db->escape($search_name)."%' OR p.firstname LIKE '%".$db->escape($search_name)."%')";
|
||||||
$sql.= " ORDER BY $sortfield $sortorder";
|
$sql.= " ORDER BY $sortfield $sortorder";
|
||||||
|
|
||||||
dol_syslog('core/lib/company.lib.php :: show_contacts sql='.$sql,LOG_DEBUG);
|
dol_syslog('core/lib/company.lib.php :: show_contacts', LOG_DEBUG);
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
|
|
||||||
|
|||||||
@@ -4197,7 +4197,7 @@ function dol_getIdFromCode($db,$key,$tablename,$fieldkey='code',$fieldid='id')
|
|||||||
$sql = "SELECT ".$fieldid." as id";
|
$sql = "SELECT ".$fieldid." as id";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX.$tablename;
|
$sql.= " FROM ".MAIN_DB_PREFIX.$tablename;
|
||||||
$sql.= " WHERE ".$fieldkey." = '".$key."'";
|
$sql.= " WHERE ".$fieldkey." = '".$key."'";
|
||||||
dol_syslog('dol_getIdFromCode sql='.$sql, LOG_DEBUG);
|
dol_syslog('dol_getIdFromCode', LOG_DEBUG);
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1293,7 +1293,7 @@ function getListOfModels($db,$type,$maxfilenamelength=0)
|
|||||||
$sql.= " WHERE type = '".$type."'";
|
$sql.= " WHERE type = '".$type."'";
|
||||||
$sql.= " AND entity IN (0,".(! empty($conf->multicompany->enabled) && ! empty($conf->multicompany->transverse_mode)?"1,":"").$conf->entity.")";
|
$sql.= " AND entity IN (0,".(! empty($conf->multicompany->enabled) && ! empty($conf->multicompany->transverse_mode)?"1,":"").$conf->entity.")";
|
||||||
|
|
||||||
dol_syslog('/core/lib/function2.lib.php::getListOfModels sql='.$sql, LOG_DEBUG);
|
dol_syslog('/core/lib/function2.lib.php::getListOfModels', LOG_DEBUG);
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -302,7 +302,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
|||||||
$sql .= " FROM ".MAIN_DB_PREFIX."socpeople as p";
|
$sql .= " FROM ".MAIN_DB_PREFIX."socpeople as p";
|
||||||
$sql .= " WHERE p.fk_soc = ".$object->id;
|
$sql .= " WHERE p.fk_soc = ".$object->id;
|
||||||
|
|
||||||
dol_syslog('doc_generic_odt :: sql='.$sql,LOG_DEBUG);
|
dol_syslog('doc_generic_odt ::', LOG_DEBUG);
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
$num = $this->db->num_rows($result);
|
$num = $this->db->num_rows($result);
|
||||||
|
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ class ProductFournisseur extends Product
|
|||||||
$sql.= " WHERE rowid = ".$this->product_fourn_price_id;
|
$sql.= " WHERE rowid = ".$this->product_fourn_price_id;
|
||||||
// TODO Add price_base_type and price_ttc
|
// TODO Add price_base_type and price_ttc
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::update_buyprice sql='.$sql);
|
dol_syslog(get_class($this).'::update_buyprice', LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
@@ -238,7 +238,7 @@ class ProductFournisseur extends Product
|
|||||||
// Delete price for this quantity
|
// Delete price for this quantity
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."product_fournisseur_price";
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."product_fournisseur_price";
|
||||||
$sql.= " WHERE fk_soc = ".$fourn->id." AND ref_fourn = '".$this->db->escape($ref_fourn)."' AND quantity = ".$qty." AND entity = ".$conf->entity;
|
$sql.= " WHERE fk_soc = ".$fourn->id." AND ref_fourn = '".$this->db->escape($ref_fourn)."' AND quantity = ".$qty." AND entity = ".$conf->entity;
|
||||||
dol_syslog(get_class($this).'::update_buyprice sql='.$sql);
|
dol_syslog(get_class($this).'::update_buyprice', LOG_DEBUG);
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -382,7 +382,7 @@ class PaiementFourn extends Paiement
|
|||||||
$sql.= ' WHERE pf.fk_facturefourn = f.rowid AND fk_paiementfourn = '.$this->id;
|
$sql.= ' WHERE pf.fk_facturefourn = f.rowid AND fk_paiementfourn = '.$this->id;
|
||||||
if ($filter) $sql.= ' AND '.$filter;
|
if ($filter) $sql.= ' AND '.$filter;
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::getBillsArray sql='.$sql,LOG_DEBUG);
|
dol_syslog(get_class($this).'::getBillsArray', LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
|||||||
$sql.= $db->order($sortfield,$sortorder);
|
$sql.= $db->order($sortfield,$sortorder);
|
||||||
$sql.= $db->plimit($conf->liste_limit+1, $offset);
|
$sql.= $db->plimit($conf->liste_limit+1, $offset);
|
||||||
|
|
||||||
dol_syslog('fourn/liste.php: sql='.$sql,LOG_DEBUG);
|
dol_syslog('fourn/liste.php:', LOG_DEBUG);
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -834,7 +834,7 @@ class Holiday extends CommonObject
|
|||||||
$sql.= " value = '".$value."'";
|
$sql.= " value = '".$value."'";
|
||||||
$sql.= " WHERE name = '".$name."'";
|
$sql.= " WHERE name = '".$name."'";
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::updateConfCP name='.$name.' sql='.$sql);
|
dol_syslog(get_class($this).'::updateConfCP name='.$name.'', LOG_DEBUG);
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
if($result) {
|
if($result) {
|
||||||
return true;
|
return true;
|
||||||
@@ -855,7 +855,7 @@ class Holiday extends CommonObject
|
|||||||
$sql.= " FROM ".MAIN_DB_PREFIX."holiday_config";
|
$sql.= " FROM ".MAIN_DB_PREFIX."holiday_config";
|
||||||
$sql.= " WHERE name = '".$name."'";
|
$sql.= " WHERE name = '".$name."'";
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::getConfCP name='.$name.' sql='.$sql);
|
dol_syslog(get_class($this).'::getConfCP name='.$name.'', LOG_DEBUG);
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
|
|
||||||
// Si pas d'erreur
|
// Si pas d'erreur
|
||||||
@@ -903,7 +903,7 @@ class Holiday extends CommonObject
|
|||||||
$sql.= " value = '".dol_print_date($now,'%Y%m%d%H%M%S')."'";
|
$sql.= " value = '".dol_print_date($now,'%Y%m%d%H%M%S')."'";
|
||||||
$sql.= " WHERE name = 'lastUpdate'";
|
$sql.= " WHERE name = 'lastUpdate'";
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::updateSoldeCP sql='.$sql);
|
dol_syslog(get_class($this).'::updateSoldeCP', LOG_DEBUG);
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
|
|
||||||
// On ajoute x jours à chaque utilisateurs
|
// On ajoute x jours à chaque utilisateurs
|
||||||
@@ -948,7 +948,7 @@ class Holiday extends CommonObject
|
|||||||
$sql.= " nb_holiday = ".$nbHoliday;
|
$sql.= " nb_holiday = ".$nbHoliday;
|
||||||
$sql.= " WHERE fk_user = '".$userID."'";
|
$sql.= " WHERE fk_user = '".$userID."'";
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::updateSoldeCP sql='.$sql);
|
dol_syslog(get_class($this).'::updateSoldeCP', LOG_DEBUG);
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
|
|
||||||
if ($result) return 1;
|
if ($result) return 1;
|
||||||
@@ -1040,7 +1040,7 @@ class Holiday extends CommonObject
|
|||||||
$sql.= " FROM ".MAIN_DB_PREFIX."holiday_users";
|
$sql.= " FROM ".MAIN_DB_PREFIX."holiday_users";
|
||||||
$sql.= " WHERE fk_user = '".$user_id."'";
|
$sql.= " WHERE fk_user = '".$user_id."'";
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::getCPforUser sql='.$sql);
|
dol_syslog(get_class($this).'::getCPforUser', LOG_DEBUG);
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
if($result) {
|
if($result) {
|
||||||
$obj = $this->db->fetch_object($result);
|
$obj = $this->db->fetch_object($result);
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ if ($action == 'update' && isset($_POST['update_cp']))
|
|||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."holiday_config SET";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."holiday_config SET";
|
||||||
$sql.= " value = '".dol_print_date($now,'%Y%m%d%H%M%S')."'";
|
$sql.= " value = '".dol_print_date($now,'%Y%m%d%H%M%S')."'";
|
||||||
$sql.= " WHERE name = 'lastUpdate' and value IS NULL"; // Add value IS NULL to be sure to update only at init.
|
$sql.= " WHERE name = 'lastUpdate' and value IS NULL"; // Add value IS NULL to be sure to update only at init.
|
||||||
dol_syslog('define_holiday update lastUpdate entry sql='.$sql);
|
dol_syslog('define_holiday update lastUpdate entry', LOG_DEBUG);
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
|
|
||||||
$mesg='<div class="ok">'.$langs->trans('UpdateConfCPOK').'</div>';
|
$mesg='<div class="ok">'.$langs->trans('UpdateConfCPOK').'</div>';
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ $sql.=$db->order($sortfield,$sortorder);
|
|||||||
// TODO: calculate total to display then restore pagination
|
// TODO: calculate total to display then restore pagination
|
||||||
//$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
//$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
||||||
|
|
||||||
dol_syslog('margin::agentMargins.php sql='.$sql,LOG_DEBUG);
|
dol_syslog('margin::agentMargins.php', LOG_DEBUG);
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -188,7 +188,7 @@ $sql.=$db->order($sortfield,$sortorder);
|
|||||||
// TODO: calculate total to display then restore pagination
|
// TODO: calculate total to display then restore pagination
|
||||||
//$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
//$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
||||||
|
|
||||||
dol_syslog('margin::customerMargins.php sql='.$sql,LOG_DEBUG);
|
dol_syslog('margin::customerMargins.php', LOG_DEBUG);
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ $sql.=$db->order($sortfield,$sortorder);
|
|||||||
// TODO: calculate total to display then restore pagination
|
// TODO: calculate total to display then restore pagination
|
||||||
//$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
//$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
||||||
|
|
||||||
dol_syslog('margin::productMargins.php sql='.$sql,LOG_DEBUG);
|
dol_syslog('margin::productMargins.php', LOG_DEBUG);
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$sql.= " ORDER BY ".$sortfield." ".$sortorder;
|
$sql.= " ORDER BY ".$sortfield." ".$sortorder;
|
||||||
// TODO: calculate total to display then restore pagination
|
// TODO: calculate total to display then restore pagination
|
||||||
//$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
//$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
||||||
dol_syslog('margin:tabs:productMargins.php sql='.$sql,LOG_DEBUG);
|
dol_syslog('margin:tabs:productMargins.php', LOG_DEBUG);
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ if ($socid > 0)
|
|||||||
// TODO: calculate total to display then restore pagination
|
// TODO: calculate total to display then restore pagination
|
||||||
//$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
//$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
||||||
|
|
||||||
dol_syslog('margin:tabs:thirdpartyMargins.php sql='.$sql,LOG_DEBUG);
|
dol_syslog('margin:tabs:thirdpartyMargins.php', LOG_DEBUG);
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ class FormProduct
|
|||||||
$sql.= " AND e.statut = 1";
|
$sql.= " AND e.statut = 1";
|
||||||
$sql.= " ORDER BY e.label";
|
$sql.= " ORDER BY e.label";
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::loadWarehouses sql='.$sql,LOG_DEBUG);
|
dol_syslog(get_class($this).'::loadWarehouses', LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -779,7 +779,7 @@ class Product extends CommonObject
|
|||||||
{
|
{
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX.$table;
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX.$table;
|
||||||
$sql.= " WHERE fk_product = ".$id;
|
$sql.= " WHERE fk_product = ".$id;
|
||||||
dol_syslog(get_class($this).'::delete sql='.$sql, LOG_DEBUG);
|
dol_syslog(get_class($this).'::delete', LOG_DEBUG);
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
if (! $result)
|
if (! $result)
|
||||||
{
|
{
|
||||||
@@ -2078,7 +2078,7 @@ class Product extends CommonObject
|
|||||||
$sql.= " WHERE fk_product_pere = ".$fk_parent;
|
$sql.= " WHERE fk_product_pere = ".$fk_parent;
|
||||||
$sql.= " AND fk_product_fils = ".$fk_child;
|
$sql.= " AND fk_product_fils = ".$fk_child;
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::del_sousproduit sql='.$sql);
|
dol_syslog(get_class($this).'::del_sousproduit', LOG_DEBUG);
|
||||||
if (! $this->db->query($sql))
|
if (! $this->db->query($sql))
|
||||||
{
|
{
|
||||||
dol_print_error($this->db);
|
dol_print_error($this->db);
|
||||||
@@ -2283,7 +2283,7 @@ class Product extends CommonObject
|
|||||||
$sql.= " FROM ".MAIN_DB_PREFIX."product_price ";
|
$sql.= " FROM ".MAIN_DB_PREFIX."product_price ";
|
||||||
$sql.= " WHERE fk_product = ". $fromId;
|
$sql.= " WHERE fk_product = ". $fromId;
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::clone_price sql='.$sql);
|
dol_syslog(get_class($this).'::clone_price', LOG_DEBUG);
|
||||||
if (! $this->db->query($sql))
|
if (! $this->db->query($sql))
|
||||||
{
|
{
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
@@ -2308,7 +2308,7 @@ class Product extends CommonObject
|
|||||||
$sql.= " SELECT null, $toId, fk_product_fils, qty FROM ".MAIN_DB_PREFIX."product_association";
|
$sql.= " SELECT null, $toId, fk_product_fils, qty FROM ".MAIN_DB_PREFIX."product_association";
|
||||||
$sql.= " WHERE fk_product_pere = '".$fromId."'";
|
$sql.= " WHERE fk_product_pere = '".$fromId."'";
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::clone_association sql='.$sql);
|
dol_syslog(get_class($this).'::clone_association', LOG_DEBUG);
|
||||||
if (! $this->db->query($sql))
|
if (! $this->db->query($sql))
|
||||||
{
|
{
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
@@ -2352,7 +2352,7 @@ class Product extends CommonObject
|
|||||||
$sql.= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price";
|
$sql.= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price";
|
||||||
$sql.= " WHERE fk_product = ".$fromId;
|
$sql.= " WHERE fk_product = ".$fromId;
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::clone_fournisseurs sql='.$sql);
|
dol_syslog(get_class($this).'::clone_fournisseurs', LOG_DEBUG);
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if (! $resql)
|
if (! $resql)
|
||||||
{
|
{
|
||||||
@@ -2562,7 +2562,7 @@ class Product extends CommonObject
|
|||||||
$sql.= " AND pa.fk_product_pere = ".$id;
|
$sql.= " AND pa.fk_product_pere = ".$id;
|
||||||
$sql.= " AND pa.fk_product_fils != ".$id; // This should not happens, it is to avoid infinite loop if it happens
|
$sql.= " AND pa.fk_product_fils != ".$id; // This should not happens, it is to avoid infinite loop if it happens
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::getChildsArbo sql='.$sql);
|
dol_syslog(get_class($this).'::getChildsArbo', LOG_DEBUG);
|
||||||
$res = $this->db->query($sql);
|
$res = $this->db->query($sql);
|
||||||
if ($res)
|
if ($res)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -412,7 +412,7 @@ class MouvementStock
|
|||||||
$sql.= ' WHERE fk_product = '.$productidselected;
|
$sql.= ' WHERE fk_product = '.$productidselected;
|
||||||
$sql.= " AND datem < '".$this->db->idate($datebefore)."'";
|
$sql.= " AND datem < '".$this->db->idate($datebefore)."'";
|
||||||
|
|
||||||
dol_syslog(get_class($this).__METHOD__.' sql='.$sql);
|
dol_syslog(get_class($this).__METHOD__.'', LOG_DEBUG);
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -390,7 +390,7 @@ else
|
|||||||
$sql.= " AND ps.fk_entrepot = ".$object->id;
|
$sql.= " AND ps.fk_entrepot = ".$object->id;
|
||||||
$sql.= $db->order($sortfield,$sortorder);
|
$sql.= $db->order($sortfield,$sortorder);
|
||||||
|
|
||||||
dol_syslog('List products sql='.$sql);
|
dol_syslog('List products', LOG_DEBUG);
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -250,7 +250,7 @@ if ($salert == 'on') // Option to see when stock is lower than alert
|
|||||||
$sql.= $db->order($sortfield,$sortorder);
|
$sql.= $db->order($sortfield,$sortorder);
|
||||||
$sql.= $db->plimit($limit + 1, $offset);
|
$sql.= $db->plimit($limit + 1, $offset);
|
||||||
|
|
||||||
dol_syslog('Execute request sql='.$sql);
|
dol_syslog('Execute request', LOG_DEBUG);
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if (empty($resql))
|
if (empty($resql))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ $sql.= " ORDER BY u.rowid, t.dateo, t.datee";
|
|||||||
|
|
||||||
$userstatic=new User($db);
|
$userstatic=new User($db);
|
||||||
|
|
||||||
dol_syslog('projet:index.php: affectationpercent sql='.$sql,LOG_DEBUG);
|
dol_syslog('projet:index.php: affectationpercent', LOG_DEBUG);
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ( $resql )
|
if ( $resql )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -380,7 +380,7 @@ class Address
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_syslog('Erreur Societe::Fetch echec sql='.$sql);
|
dol_syslog('Erreur Societe::Fetch echec', LOG_DEBUG);
|
||||||
dol_syslog('Erreur Societe::Fetch '.$this->db->error());
|
dol_syslog('Erreur Societe::Fetch '.$this->db->error());
|
||||||
$this->error=$this->db->error();
|
$this->error=$this->db->error();
|
||||||
$result = -3;
|
$result = -3;
|
||||||
|
|||||||
@@ -2272,7 +2272,7 @@ class Societe extends CommonObject
|
|||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."societe";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."societe";
|
||||||
$sql.= " SET parent = ".($id > 0 ? $id : "null");
|
$sql.= " SET parent = ".($id > 0 ? $id : "null");
|
||||||
$sql.= " WHERE rowid = " . $this->id;
|
$sql.= " WHERE rowid = " . $this->id;
|
||||||
dol_syslog(get_class($this).'::set_parent sql='.$sql);
|
dol_syslog(get_class($this).'::set_parent', LOG_DEBUG);
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -260,7 +260,7 @@ class User extends CommonObject
|
|||||||
$sql = "SELECT param, value FROM ".MAIN_DB_PREFIX."user_param";
|
$sql = "SELECT param, value FROM ".MAIN_DB_PREFIX."user_param";
|
||||||
$sql.= " WHERE fk_user = ".$this->id;
|
$sql.= " WHERE fk_user = ".$this->id;
|
||||||
$sql.= " AND entity = ".$conf->entity;
|
$sql.= " AND entity = ".$conf->entity;
|
||||||
//dol_syslog(get_class($this).'::fetch load personalized conf sql='.$sql, LOG_DEBUG);
|
//dol_syslog(get_class($this).'::fetch load personalized conf', LOG_DEBUG);
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
@@ -536,7 +536,7 @@ class User extends CommonObject
|
|||||||
$sql.= " AND r.perms IS NOT NULL";
|
$sql.= " AND r.perms IS NOT NULL";
|
||||||
if ($moduletag) $sql.= " AND r.module = '".$this->db->escape($moduletag)."'";
|
if ($moduletag) $sql.= " AND r.module = '".$this->db->escape($moduletag)."'";
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::getrights sql='.$sql, LOG_DEBUG);
|
dol_syslog(get_class($this).'::getrights', LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
@@ -586,7 +586,7 @@ class User extends CommonObject
|
|||||||
$sql.= " AND r.perms IS NOT NULL";
|
$sql.= " AND r.perms IS NOT NULL";
|
||||||
if ($moduletag) $sql.= " AND r.module = '".$this->db->escape($moduletag)."'";
|
if ($moduletag) $sql.= " AND r.module = '".$this->db->escape($moduletag)."'";
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::getrights sql='.$sql, LOG_DEBUG);
|
dol_syslog(get_class($this).'::getrights', LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
@@ -1616,7 +1616,7 @@ class User extends CommonObject
|
|||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."user_clicktodial";
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."user_clicktodial";
|
||||||
$sql .= " WHERE fk_user = ".$this->id;
|
$sql .= " WHERE fk_user = ".$this->id;
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::update_clicktodial sql='.$sql);
|
dol_syslog(get_class($this).'::update_clicktodial', LOG_DEBUG);
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
|
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."user_clicktodial";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."user_clicktodial";
|
||||||
@@ -1627,7 +1627,7 @@ class User extends CommonObject
|
|||||||
$sql .= ", '". $this->db->escape($this->clicktodial_password) ."'";
|
$sql .= ", '". $this->db->escape($this->clicktodial_password) ."'";
|
||||||
$sql .= ", '". $this->db->escape($this->clicktodial_poste) ."')";
|
$sql .= ", '". $this->db->escape($this->clicktodial_poste) ."')";
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::update_clicktodial sql='.$sql);
|
dol_syslog(get_class($this).'::update_clicktodial', LOG_DEBUG);
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -471,7 +471,7 @@ class UserGroup extends CommonObject
|
|||||||
$sql.= " AND r.perms IS NOT NULL";
|
$sql.= " AND r.perms IS NOT NULL";
|
||||||
if ($moduletag) $sql.= " AND r.module = '".$this->db->escape($moduletag)."'";
|
if ($moduletag) $sql.= " AND r.module = '".$this->db->escape($moduletag)."'";
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::getrights sql='.$sql, LOG_DEBUG);
|
dol_syslog(get_class($this).'::getrights', LOG_DEBUG);
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user