57 null !== self::$global_mail_services_cache[CACHE_TYPE_REF_ID])
65 $res = $ilDB->queryf(
'
66 SELECT object_reference.ref_id FROM object_reference, tree, object_data
67 WHERE tree.parent = %s
68 AND object_data.type = %s
69 AND object_reference.ref_id = tree.child
70 AND object_reference.obj_id = object_data.obj_id',
71 array(
'integer',
'text'),
72 array(SYSTEM_FOLDER_ID,
'mail'));
74 while(
$row = $ilDB->fetchAssoc(
$res))
113 $res = $ilDB->queryf(
'
114 SELECT COUNT(mail_id) cnt FROM mail
118 array(
'integer',
'integer',
'text'),
119 array(
'0', $usr_id,
'unread'));
123 $res = $ilDB->queryf(
'
124 SELECT COUNT(mail_id) cnt FROM mail m,mail_obj_data mo
125 WHERE m.user_id = mo.user_id
126 AND m.folder_id = mo.obj_id
129 AND m.m_status = %s',
130 array(
'text',
'integer',
'text'),
131 array(
'inbox', $usr_id,
'unread'));
134 $row2 = $ilDB->fetchAssoc(
$res);