Forum Moderators: coopster & phranque

Message Too Old, No Replies

Ideas on best way to code a search script

         

dreaming of nascar

9:54 pm on Apr 19, 2003 (gmt 0)

10+ Year Member



I have 7 different files that are setup fairly identical that hold the information for the products that are currently for sale on my site. Each file holds the information for different "departments." This is an example of how the product information in a file is formatted:

ProductID¦Price¦Line one of heading¦Line two of heading¦Description

Each product is stored in this fashion in it's respective "department." All of the different fields (separated by ¦) CAN be more than one word, except for the first two. My problem is that I do not know the best way to go about constructing a search script so that users can search my site for the products. I'd like to have the "" and - functions available, but would like to have anything to start off with. I hope that I am not asking for too much here. I think that I could get the code down if someone could give me advice on how to break up the information in the files. Also, some helpful code snippets would be appreciated.

Thanks in advance!

D O N

SinclairUser

10:45 pm on Apr 19, 2003 (gmt 0)

10+ Year Member



You can use split to isolate the fields and then us RE's to match the search against the database.