Данные о депозитах

Bad SQL query:
SELECT * FROM ut_rimage WHERE RubricWP=(SELECT WebPath FROM ut_structure WHERE TreeCode=(SELECT LEFT(TreeCode,11) FROM ut_structure WHERE StructureID=(SELECT ParentID FROm ut_webtext WHERE ut_webtextID=))) ORDER BY RAND() LIMIT 0,1
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '))) ORDER BY RAND() LIMIT 0,1' at line 1