Can you please check this mysql query and maybe help with what's wrong with it?
When I run it through mysql as my host i get this error:
#1248 - Every derived table must have its own alias
Here is the code:
mysql_query("
SELECT COUNT(*)
FROM
(
(SELECT 1 as sort_col,id,pic0 FROM `cronjob_reloaded` WHERE id IS NOT NULL AND id LIKE '%car%')
UNION
(SELECT 2 as sort_col,id,pic0 FROM `cronjob_reloaded` WHERE id IS NOT NULL AND category IN ('bmw'))
ORDER BY sort_col
)
")
Ty!
PS. I have posted an unclear question some time ago, can a admin please delete that one? And sorry for any inconvenience. The question is here