There is no rowid in llx_opensurvey_sondage table

This commit is contained in:
Marcos García de La Fuente
2014-01-03 22:29:40 +01:00
parent 1a038fac06
commit 2b01981213

View File

@@ -179,7 +179,6 @@ class Opensurveysondage extends CommonObject
global $langs;
$sql = "SELECT";
//$sql.= " t.rowid,";
$sql.= " t.id_sondage,";
$sql.= " t.commentaires,";
$sql.= " t.mail_admin,";
@@ -193,8 +192,7 @@ class Opensurveysondage extends CommonObject
$sql.= " t.sujet,";
$sql.= " t.tms";
$sql.= " FROM ".MAIN_DB_PREFIX."opensurvey_sondage as t";
if ($id > 0) $sql.= " WHERE t.rowid = ".$this->db->escape($id);
else $sql.= " WHERE t.id_sondage = '".$this->db->escape($numsurvey)."'";
$sql.= " WHERE t.id_sondage = '".$this->db->escape($numsurvey)."'";
dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG);
$resql=$this->db->query($sql);
@@ -204,8 +202,6 @@ class Opensurveysondage extends CommonObject
{
$obj = $this->db->fetch_object($resql);
//$this->id = $obj->rowid;
$this->id_sondage = $obj->id_sondage;
$this->commentaires = $obj->commentaires;
$this->mail_admin = $obj->mail_admin;
@@ -283,7 +279,6 @@ class Opensurveysondage extends CommonObject
$sql.= " canedit=".$this->db->escape($this->canedit).",";
$sql.= " allow_comments=".$this->db->escape($this->allow_comments);
//$sql.= " WHERE rowid=".$this->id;
$sql.= " WHERE id_sondage='".$this->db->escape($this->id_sondage)."'";
$this->db->begin();