Can't execute query

SELECT a.*
				FROM sw_pages_labels l, sw_pages a LEFT OUTER JOIN sw_sequences s ON (s.id_table=a.id AND s.table_name='sw_pages')
				WHERE ((id_sw_pages_def IN (58)
				AND visible=1
				AND archived=0)
				OR (date_always=0
				AND visible=1
				AND id_sw_pages_def IN (58)
				AND archived=0))
				AND l.type='par'
				AND l.id_sw_labels = 5
				AND a.id = l.id_sw_pages
				AND a.id IN (SELECT a.id
				FROM sw_pages_labels l, sw_pages a LEFT OUTER JOIN sw_sequences s ON (s.id_table=a.id AND s.table_name='sw_pages')
				WHERE ((id_sw_pages_def IN (58)
				AND visible=1
				AND archived=0)
				OR (date_always=0
				AND visible=1
				AND id_sw_pages_def IN (58)
				AND archived=0))
				AND l.type='par'
				AND l.id_sw_labels = 4
				AND a.id = l.id_sw_pages)
				 AND a.id=  
				ORDER BY  s.sequence
				 LIMIT 0, 10

MySQL 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 'ORDER BY s.sequence LIMIT 0, 10' at line 26

This script cannot continue, terminating.