From 98403f3bcbc2bcdc8b212ccdeb00c57f16258fa3 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Tue, 5 Jun 2007 09:31:06 +0000 Subject: [PATCH] Bugfix --- htdocs/telephonie/adsl/ligneadsl.class.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/telephonie/adsl/ligneadsl.class.php b/htdocs/telephonie/adsl/ligneadsl.class.php index cf7220f8266..4f08a6ba84f 100644 --- a/htdocs/telephonie/adsl/ligneadsl.class.php +++ b/htdocs/telephonie/adsl/ligneadsl.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2005-2007 Rodolphe Quiedeville * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -90,9 +90,11 @@ class LigneAdsl { $sql .= " VALUES ("; $sql .= " $this->client,$this->client_install,$this->client_facture,'$this->numero',$this->type,$this->fournisseur, '$this->note',$this->commercial, -1,$user->id)"; - if ( $this->db->query($sql) ) + $resql = $this->db->query($sql); + + if ( $resql ) { - $this->id = $this->db->last_insert_id(); + $this->id = $this->db->last_insert_id($resql); return 0; } else