Invalid SQL: select items.* from flatpacklinux_items as items inner join flatpacklinux_category as category on (category.id = items.catID) where items.catID= and items.active=1 order by ranking LIMIT 0, 12