Adding a "fixed" search requirement to a DA Search feature.
I have a recordset which is filtered by DA Search, about 6 different fields. Now, I need to add additional criteria to the recordset - not part of the search, but just a "fixed" condition which needs to be present apart from all of the other search parameters. This is my query ... Where would I put the additional parameter? The additional criteria would be "AND listingstatus = 0."
$query_getResults = "SELECT lostdogs.ID, members.memberID, members.fname, members.lname, members.organization, members.email, members.phone, members.state AS memberState, lostdogs.listingtype, lostdogs.listingstatus, lostdogs.nameofdog, lostdogs.datemissing, lostdogs.datefound, lostdogs.city, lostdogs.county, lostdogs.state, lostdogs.gender, lostdogs.breedingstatus, lostdogs.breedtype, lostdogs.color, lostdogs.colorother, lostdogs.BlondeUnderbelly, lostdogs.photo, lostdogs.photo2, lostdogs.photo3, lostdogs.keywords
FROM lostdogs LEFT JOIN members ON lostdogs.memberID = members.memberID";
$query_limit_getResults = sprintf("%s LIMIT %d, %d", $query_getResults, $startRow_getResults, $maxRows_getResults);
$getResults = mysql_query($query_limit_getResults, $lostfound) or die(mysql_error());
$row_getResults = mysql_fetch_assoc($getResults);