select * from `itenerary_content` join `itenerary_hf` where itenerary_content.pid='' and itenerary_hf.pid='' order by itenerary_content.id