Failed to retrieve pco data No database selected select * from checkouts where ((status1="On Hold") OR ( (status1="Schedule") AND (status2="On Hold")) ) order by pcode