QUERY: SELECT id,titulo FROM intranet_categorias WHERE (( (SELECT count(user_id) FROM intranet_users_categorias AS uc WHERE uc.user_id = ) = 0 OR (SELECT user_id FROM intranet_users_categorias as uc WHERE uc.user_id = AND uc.categoria_id = id )))
ERROR: 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 ') = 0 OR (SELECT user_id FROM intranet_users_categor' at line 3