[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?PHP 2 /* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 * 18 * $Id: methode.commande.class.php,v 1.2 2005/04/18 09:37:00 rodolphe Exp $ 19 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/telephonie/fournisseur/commande/methode.commande.class.php,v $ 20 * 21 */ 22 23 class CommandeMethode 24 { 25 26 function LogSql() 27 { 28 $error = 0; 29 30 $sql = "INSERT INTO ".MAIN_DB_PREFIX."telephonie_commande"; 31 $sql .= " (datec, fk_user_creat, fk_fournisseur, filename)"; 32 $sql .= " VALUES (now(),".$this->user->id.",".$this->fourn->id.",'".$this->filename."')"; 33 34 $resql = $this->db->query($sql); 35 36 if ($resql) 37 { 38 $this->commande_id = $this->db->last_insert_id(MAIN_DB_PREFIX."telephonie_commande"); 39 40 /* 41 * Modifie le statut des lignes commandées 42 * 43 */ 44 foreach ($this->ligneids as $lid) 45 { 46 $sql = "INSERT INTO ".MAIN_DB_PREFIX."telephonie_commande_ligne"; 47 $sql .= " (fk_commande, fk_ligne)"; 48 $sql .= " VALUES (".$this->commande_id.",".$lid.")"; 49 50 if (! $this->db->query($sql) ) 51 { 52 $error++; 53 dolibarr_syslog($sql); 54 } 55 } 56 } 57 else 58 { 59 $error++; 60 dolibarr_syslog($sql); 61 } 62 63 return $error; 64 65 } 66 }
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 12:29:37 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |