Sorry, going back to this one, I simplified the search as much as I could but we are still seeing very odd results in our searches.
We have this live on the domain now at:
http://www.portpatrickchurchyard.org.uk/
Using the search box, top right, works well but, spookily, if you try a search for "jones" two records are always returned despite them having NO reference to the name "jones" at all in any of the fields the querybuilder is querying!
This is our WebAssist QueryBuilder code...
<?php
if (isset($_POST["pocsearchBTN"]) || isset($_POST["pocsearchBTN_x"])) {
$rsSEARCH = new WA_MySQLi_RS("rsSEARCH",$csdbmysqli,0);
$rsSEARCH->setQuery("SELECT POCheadstones.HeadstoneID, POCheadstones.MapRefID, POCheadstones.DGFHSID, POCheadstones.Inscription, POCheadstones.StoneDescription, COUNT(POCphotographs.PhotographID) AS numofimgs, POCphotographs.PhotographFilename FROM POCheadstones INNER JOIN POCphotographs ON POCheadstones.HeadstoneID = POCphotographs.HeadstoneID WHERE POCheadstones.MapRefID LIKE ? OR POCheadstones.Inscription LIKE ? OR POCheadstones.DGFHSID LIKE ? OR POCheadstones.StoneDescription LIKE ? GROUP BY POCheadstones.MapRefID ASC");
$rsSEARCH->bindParam("c", "".(isset($_POST['headstonesearch'])?$_POST['headstonesearch']:"") ."", "-1"); //WAQB_Param1
$rsSEARCH->bindParam("c", "".(isset($_POST['headstonesearch'])?$_POST['headstonesearch']:"") ."", "-1"); //WAQB_Param2
$rsSEARCH->bindParam("c", "".(isset($_POST['headstonesearch'])?$_POST['headstonesearch']:"") ."", "-1"); //WAQB_Param3
$rsSEARCH->bindParam("c", "".(isset($_POST['headstonesearch'])?$_POST['headstonesearch']:"") ."", "-1"); //WAQB_Param4
$rsSEARCH->execute();
}
?>
Hope you can help shed some light on this one.
Thank you.
NJ