Commit 7f47a40b authored by Alan Garcia's avatar Alan Garcia
Browse files

Optimisation quotamail

parent c13616f1
......@@ -58,7 +58,8 @@ class m_mail {
global $db,$err,$cuid;
if ($name=="mail") {
$err->log("mail","getquota");
$db->query("SELECT COUNT(*) AS cnt FROM address WHERE domain_id in(select id from domaines where compte=$cuid);");
//$db->query("SELECT COUNT(*) AS cnt FROM address WHERE domain_id in(select id from domaines where compte=$cuid);");
$db->query("SELECT COUNT(a.id) AS cnt FROM address a, domaines d WHERE a.domain_id =d.id and d.compte=$cuid group by a.id;");
$db->next_record();
return $db->f("cnt");
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment