PHP/MySQL Query Database with Variable number of fields

Myrle Francis mafmanet-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Wed Nov 3 11:08:58 EDT 2010


I waant to be able to query on any of thes fields or any combination of
these fields

I Know how to query any one field or multiple fields but want I want to do
is have field1, Field2 and Field3 populated in a drop-down list and query my
database given the number of fields that are selected.. (maybe just query
Field1 or query field1 and Field3)


I really hope that makes sense... (i'm a little flustered :) )


ie

where field1 = 1
or Where Field1=1 and Field3=no

or any combination....

Database
Field1, Field2, Field3
a      1        yes
b          2        no
c          3        maybe
d        (blank)  yes


Thanks in advance



-- 
-- 
Myrle A. Francis 2nd

PgpServer(s): pgp.mit.edu

Type bits /keyID    Date       User ID
pub  1024D/30BDB814 2006/07/27 Myrle A. Francis 2nd <mafmanet-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org>
     Key fingerprint = 73E3 6EAF EC29 29A3 94F9  6C78 F427 0FE8 30BD B814





More information about the Discuss mailing list