Revize 1304
Přidáno uživatelem Michal Kliment před asi 13 roky(ů)
freenetis/branches/testing/application/models/job.php | ||
---|---|---|
// query
|
||
return $this->db->query("
|
||
SELECT q.*, (agree_count - disagree_count) AS approval_state
|
||
FROM (
|
||
FROM
|
||
(
|
||
SELECT j.*, CONCAT(u.name,' ', u.surname) AS uname,
|
||
(
|
||
SELECT COUNT(*)
|
||
... | ... | |
{
|
||
// query
|
||
return $this->db->query("
|
||
SELECT q.*, (agree_count - disagree_count) AS approval_state FROM (
|
||
SELECT q.*, (agree_count - disagree_count) AS approval_state
|
||
FROM
|
||
(
|
||
SELECT j.*, t.amount as rating,
|
||
(
|
||
SELECT COUNT(*)
|
||
... | ... | |
(
|
||
SELECT GROUP_CONCAT(user, ' (',SUBSTRING(c.datetime,1,10),'): \n',c.text SEPARATOR ', \n\n') FROM
|
||
(
|
||
SELECT c.*, CONCAT(u.surname,' ',u.name) AS user
|
||
FROM comments c
|
||
SELECT c.*, CONCAT(u.surname,' ',u.name) AS user FROM comments c
|
||
LEFT JOIN users u ON c.user_id = u.id
|
||
ORDER BY datetime DESC
|
||
) AS c
|
||
WHERE c.comments_thread_id = j.comments_thread_id
|
||
GROUP BY c.user_id
|
||
) AS c WHERE c.comments_thread_id = j.comments_thread_id GROUP BY c.comments_thread_id
|
||
) AS comments,
|
||
(
|
||
SELECT GROUP_CONCAT(comment SEPARATOR ', \n\n') FROM
|
Také k dispozici: Unified diff
Oprava chyby u zobrazeni praci uzivatele.