Hesla dle oboru -
SELECT t.*, tt.*, u.*, ts.* FROM term t
LEFT JOIN termText tt on t.termId=tt.termId
LEFT JOIN user u ON t.authorUserId=u.userId
LEFT JOIN termStatus ts ON tt.termStatusId=ts.termStatusId
LEFT JOIN category_term tc ON tc.termId=t.termId
WHERE tc.categoryId= AND UPPER(SUBSTRING(t.termName, 1,1))='V' AND tt.termStatusId=5 GROUP BY t.termId ORDER BY t.termName ASC, t.termId DESC [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND UPPER(SUBSTRING(t.termName, 1,1))='V' AND tt.termStatusId=5 GROUP BY t.term' at line 6]