The used SELECT statements have a different number of columnsselect distinct(books_id) from display_cat where main_cat = 'C1111111111111' UNION SELECT CHAR(45,120,49,45,81,45),CHAR(45,120,50,45,81,45) -- /* order by 'as' order by id desc