Posted by Michael on 01/25/05 09:47
Hi Everybody,
I have an array that outputs the ID's of a table after a keyword search. I
am not sure how the select statement should look like to have all "ID"
numbers generated by a foreach loop. Thanks for any advice!
$mysearchterms = $_POST['searchtext'];
if ($mysearchterms != '') {
require('search_class.php');
$mysearch = new MysqlSearch;
$mysearch->set_Identifier("model_id");
$mysearch->set_SearchTable("model");
$mysearch->set_SearchColumns("model, description");
$mysearch->get_ErrorStr();
$result_arry = $mysearch->find($mysearchterms);
-------------------------------------------------------------------------------------------------
foreach ($result_arry as $value)
$where .= " AND model_id = '$value' "; # the search lists only the first
ID number from the keyword search.
---------------------------------------------------------------------------------------------------
}
$output= @mysql_query($select . $from . $where);
while ($model01 = mysql_fetch_array($output)) {
[Back to original message]
|