From 647ee203d1287838a3615a106951867bf983300b Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Mon, 5 Dec 2005 09:25:50 +0000 Subject: [PATCH] =?UTF-8?q?Ajout=20possibilit=E9=20de=20commander=20une=20?= =?UTF-8?q?ligne=20sp=E9cifique?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/telephonie/script/commande_presel.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/htdocs/telephonie/script/commande_presel.php b/htdocs/telephonie/script/commande_presel.php index 58fad6793de..d01a9fffeeb 100644 --- a/htdocs/telephonie/script/commande_presel.php +++ b/htdocs/telephonie/script/commande_presel.php @@ -41,6 +41,10 @@ for ($i = 1 ; $i < sizeof($argv) ; $i++) { $verbose = 3; } + if (strlen($argv[$i]) == 10) + { + $ligne = $argv[$i]; + } } @@ -63,8 +67,12 @@ $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= " , ".MAIN_DB_PREFIX."telephonie_societe_ligne as l"; $sql .= " , ".MAIN_DB_PREFIX."telephonie_fournisseur as f"; $sql .= " WHERE l.fk_soc = s.idp AND l.fk_fournisseur = f.rowid"; -$sql .= " AND f.rowid = 4 AND l.statut = 9 ORDER BY l.rowid DESC"; - +$sql .= " AND f.rowid = 4 AND l.statut = 9"; +if ($ligne > 0) +{ + $sql .= " AND l.numero ='".$ligne."'"; +} +$sql .= " ORDER BY l.rowid DESC"; $resql = $db->query($sql); $result = 1; if ($resql)