looping over field, keyword arrays to generate sql
| From: | Joseph Blythe | Date: | Fri, 09 May 2003 00:44:51 +0000 |
| Subject: | looping over field, keyword arrays to generate sql | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-146945@lists.php.net to get a copy of this message | ||
Hey everyone,
Was wondering if anyone could point me to a algorithm to loop through two
arrays one being a list of keywords and the other a list of field names to
generate part of an sql statement like:
$sql .= $field " LIKE '%" . $word . "%' OR "
Have looked at many search scripts and classes but none really have this
part the way I would like it thought maybe someone may alreday have this or
could point me to a good example?
Any help appreciated,
Regards,
Joseph Blythe