Best approach?
- From: "John Germany" <jgphotography@xxxxxxxxxxxxxx>
- Date: Sun, 16 Mar 2008 17:25:22 -0400
I've written a function that parses a search string and returns a 1D array
for each word in the string.
Such as, "PAINT SPRAY RED" would return an array of
cArray[1,1]="PAINT"
cArray[2,1]="SPRAY"
etc.
Now I want to issue a SELECT statement to search my inventory file
Select * from inventory WHERE cArray[1,1]$descript AND .... (or several
other fields may be searched) and so on...
The problem is that I can't hard code the select statement because the
function will create the number of elements for the array based on how many
search terms are entered. I'm assuming a user defined function in the
select to return the WHERE clause would work, but is this best? (or is this
even permissable and will a UDF in a Select statement return correct
results?)
What would be the best approach for this?
How do search engines like google parse the search string and then return
the results to a cursor?
Thanks,
John
I'm using VFP8SP1
.
- Follow-Ups:
- Re: Best approach?
- From: Anders Altberg
- Re: Best approach?
- From: Jan Bucek
- Re: Best approach?
- Prev by Date: Re: [Microsoft][ODBC dBase Driver] Index not found
- Next by Date: Re: Best approach?
- Previous by thread: Insert sql ... if not found idea
- Next by thread: Re: Best approach?
- Index(es):
Relevant Pages
|