Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Building a WHERE clause
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Building a WHERE clause
Miscellaneous
Thread ID:
00166558
Message ID:
00166558
Views:
63
Does anyone have a good function/procedure/class that can build n-sized WHERE clauses? That is, I want to be able to pass it something like an array full of populated or empty fields and have it automatically add any needed " AND ". So I could do something like:

lnElements = 4
DIMENSION laFilter[lnElements]

laFilter[1] = "One"
laFilter[2] = ""
laFilter[3] = "Three"
laFilter[4] = "Four"

oSQL.Where(@laFilter)

?oSQL.WhereClause

One AND Three AND four
-Paul

RCS Solutions, Inc.
Blog
Twitter
Next
Reply
Map
View

Click here to load this message in the networking platform