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