You are here: array output for select statement « PHP « IT news, forums, messages
array output for select statement

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)) {

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация