From 9bd6db4d1ff73c026c004613d8fc6cf2a7682561 Mon Sep 17 00:00:00 2001 From: Benjamin Sonntag Date: Sat, 25 Aug 2012 21:06:27 +0000 Subject: [PATCH] suppression de fonctions inutiles dans m_dom + maj on SQL query --- bureau/class/m_dom.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bureau/class/m_dom.php b/bureau/class/m_dom.php index 6250b8f7..907c8372 100644 --- a/bureau/class/m_dom.php +++ b/bureau/class/m_dom.php @@ -647,7 +647,7 @@ class m_dom { return false; } $r["name"]=$dom; - $db->query("select * from domaines where compte='$cuid' and domaine='$dom'"); + $db->query("SELECT * FROM domaines WHERE compte='$cuid' AND domaine='$dom'"); if ($db->num_rows()==0) { $err->raise("dom",1,$dom); return false; @@ -660,11 +660,11 @@ class m_dom { $r["mail"]=$db->Record["gesmx"]; $r['noerase']=$db->Record['noerase']; $db->free(); - $db->query("select count(*) as cnt from sub_domaines where compte='$cuid' and domaine='$dom'"); + $db->query("SELECT COUNT(*) AS cnt FROM sub_domaines WHERE compte='$cuid' AND domaine='$dom'"); $db->next_record(); $r["nsub"]=$db->Record["cnt"]; $db->free(); - $db->query("select sd.*, dt.description as type_desc, dt.only_dns from sub_domaines sd, domaines_type dt where compte='$cuid' and domaine='$dom' and upper(dt.name)=upper(sd.type) order by sd.sub,sd.type"); + $db->query("SELECT sd.*, dt.description AS type_desc, dt.only_dns FROM sub_domaines sd, domaines_type dt WHERE compte='$cuid' AND domaine='$dom' AND UPPER(dt.name)=UPPER(sd.type) ORDER BY sd.sub,sd.type"); // Pas de webmail, on le cochera si on le trouve. for($i=0;$i<$r["nsub"];$i++) { $db->next_record();