Modification de la proc create, renvoie dsormais l'id

This commit is contained in:
Rodolphe Quiedeville 2004-07-21 14:40:55 +00:00
parent ffcb34f7d2
commit fd47881a69

View File

@ -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 '<b>'.$sql.'</b><br>'.$this->db->error();
}