From 65f61e7a6a00603a27ee08c63ea048c741017b6a Mon Sep 17 00:00:00 2001 From: Sesostris Vieira Date: Mon, 8 Sep 2014 16:55:03 -0300 Subject: [PATCH] Excluir prexivo mdl_ de selects --- index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.php b/index.php index cff4abb..09896ec 100644 --- a/index.php +++ b/index.php @@ -68,9 +68,9 @@ $fullname = $DB->sql_fullname('u.firstname', 'u.lastname'); $sql = " select u.id, $fullname as fullname, u.picture, u.firstname, u.lastname, u.imagealt, u.email, - (select count(*) from mdl_message where useridfrom=u.id and useridto<>u.id and useridto $in_user) as totalsend, - (select count(*) from mdl_message where useridto=u.id and useridfrom<>u.id and useridfrom $in_user) as totalreceive -from mdl_user u + (select count(*) from {message} where useridfrom=u.id and useridto<>u.id and useridto $in_user) as totalsend, + (select count(*) from {message} where useridto=u.id and useridfrom<>u.id and useridfrom $in_user) as totalreceive +from {user} u where u.id $in_user ";