Browse Source

Excluir prexivo mdl_ de selects

master
Sesostris Vieira 10 years ago
parent
commit
65f61e7a6a
  1. 6
      index.php

6
index.php

@ -68,9 +68,9 @@ $fullname = $DB->sql_fullname('u.firstname', 'u.lastname');
$sql = " $sql = "
select u.id, $fullname as fullname, u.picture, u.firstname, u.lastname, u.imagealt, u.email, 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 {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 (select count(*) from {message} where useridto=u.id and useridfrom<>u.id and useridfrom $in_user) as totalreceive
from mdl_user u from {user} u
where u.id $in_user where u.id $in_user
"; ";

Loading…
Cancel
Save