Add a Search Criteria
Hi,
How can I alter the following code to allow for an additional column in my database recordset to pull keywords from. ( I currently have a database with a column titled ImageKeywords that I have a search form pulling results from. I want to be able to add a second column in my database titled ImageKeywords2 to allow for some more esoteric terms).
Search Page:
<?php echo((isset($_GET[" ImageKeywords "])?$_GET[" ImageKeywords "]:" ")); ?>
Results Page:
<?php
$searchWADAgallery_1 = new WA_MySQLi_Search("WADAgallery","");
if (isset($_GET["Search"]) || isset($_GET["Search_x"])) {
$searchWADAgallery_1->clearSearch();
$searchWADAgallery_1->setSearch(array("type"=>"Key", "comparison"=>"Includes", "join"=>"AND", "and"=>" AND ", "or"=>" OR ", "start_encap"=>"\"", "end_encap"=>"\""), array("ImageKeywords"), "s", "".((isset($_GET["ImageKeywords"]))?$_GET["ImageKeywords"]:"") ."");
}
?>
<?php
$WADAgallery = new WA_MySQLi_RS("WADAgallery",$logomatcentral,0);
$WADAgallery->setQuery("SELECT ImageCat, ImageID, ImageSrc, ImageSrcLg, ImageTitle, ImageKeywords, ImageKeywords2 FROM gallery");
$WADAgallery->execute();
?>
<?php
LivePage On Web:
https://www.logomatcentral.com/SampleGallery/index.php