From 9f0065437772dd10d16e60158b6b16bb419d0e6e Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Sun, 14 Sep 2003 12:07:30 +0000 Subject: [PATCH] Modif function create --- htdocs/contact.class.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/htdocs/contact.class.php b/htdocs/contact.class.php index ad74c3c37dc..12c3cc535d5 100644 --- a/htdocs/contact.class.php +++ b/htdocs/contact.class.php @@ -46,6 +46,18 @@ class Contact * * */ + Function create($user) + { + $sql = "INSERT INTO llx_socpeople (datec, fk_soc,name) "; + $sql .= " VALUES (now(),$this->socid,'$this->nom')"; + + if ($this->db->query($sql) ) { + $id = $this->db->last_insert_id(); + + return $id; + } + + } Function fetch($id) {