From fd47881a6964616825d5ca41978e56a5af56f2c2 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Wed, 21 Jul 2004 14:40:55 +0000 Subject: [PATCH] =?UTF-8?q?Modification=20de=20la=20proc=20create,=20renvo?= =?UTF-8?q?ie=20d=E9sormais=20l'id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/projet/project.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/projet/project.class.php b/htdocs/projet/project.class.php index c7ee99cd467..5e1870904a2 100644 --- a/htdocs/projet/project.class.php +++ b/htdocs/projet/project.class.php @@ -44,7 +44,11 @@ class Project { $sql = "INSERT INTO ".MAIN_DB_PREFIX."projet (ref, title, fk_soc, fk_user_creat, dateo) "; $sql .= " VALUES ('$this->ref', '$this->title', $this->socidp, $creatorid, now()) ;"; - if (!$this->db->query($sql) ) + if ($this->db->query($sql) ) + { + return $this->db->last_insert_id(); + } + else { print ''.$sql.'
'.$this->db->error(); }