I'm migrating my code from Informix 4GL to PHP, my problem now is how to
give the users the ability to make a query with the facilities that the
CONTRUCT verb gives in 4GL.
Suppose a form field name 'price' where the users can type the search
If the user type ... I need to get ...
123.23 "price = 123.23"
>100 "price > 100"
<=500 "price <= 500"
100..200 "price between 100 and 200"
100,200 "price in (100,200)"
In a string field named "city"
If the user type ... I need to get
sacramento "city = 'SACRAMENTO'"
sacra* "city MATCHES 'SACRA*'"
>Wy "city > 'WY"
Something like ..
$qbe = qbe('city','options')
$qry = "select * from customers where ".$qbe;
and the qbe function can get the typed from $_POST[$parm1] and using the
options chose between char or numeric data type , upshift or as is, matches
or like, etc.
Exist something like that?
I'm reinventing the wheel?
How are you solving this kind of problem?
Fernando Ortiz Muņoz
Fabrica de Jabon la Corona, SA de CV
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php