MySQL query error!

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 '=cp.catid WHERE = 1 LIMIT 1' at line 1
Query: SELECT, (u.downloaded+IFNULL(x.downloaded,0)) as downloaded, ((u.uploaded+IFNULL(x.uploaded,0))/(u.downloaded+IFNULL(x.downloaded,0))) as uratio, cp.* FROM xbtit_users u LEFT JOIN xbt_users x ON INNER JOIN xbtit_categories_perm cp ON u.id_level=cp.levelid AND =cp.catid WHERE = 1 LIMIT 1;