I'm doing a simple PHP/MySQL SELECT query as I have done many many times now, only now I have added a new column to my 'bookings' table called 'deleted'. I have made a page where I can submit through and 'delete' a booking (actually puts a 'Y' in the deleted column). Obviously I now want to add a bit on my SQL query's that list my bookings that says something like...
Code: Select all
WHERE deleted!='Y'Code: Select all
WHERE deleted='Y'To summarise, here's a snippet of what does not work:
Code: Select all
$query = "SELECT title, shortdesc, customerid, quotedate, quotetime, bookingid, frompostcode, topostcode, subcontractorid, podtime, poddate, podname, readytoinvoice, payamount FROM bookings WHERE ownerid='".$userid."' AND subcontractorid!='' AND podname!='' AND deleted!='Y'";
$result = mysql_query($query);Code: Select all
$query = "SELECT title, shortdesc, customerid, quotedate, quotetime, bookingid, frompostcode, topostcode, subcontractorid, podtime, poddate, podname, readytoinvoice, payamount FROM bookings WHERE ownerid='".$userid."' AND subcontractorid!='' AND podname!='' AND deleted='Y'";
$result = mysql_query($query);Thanks.