PHP Classes


Recommend this page to a friend!

      Top level forums  >  PHP Specialists  >  General  >  PHP PROBLEM  
Summary:building of a dynamic mysql query.
Author:Abdul Qadir
Date:2008-04-28 04:47:54
Update:2008-05-12 11:21:54

  1. PHP PROBLEM   Reply   Report abuse  
Picture of Abdul Qadir Abdul Qadir - 2008-04-28 04:47:54
Hi all,

I wish to get assistance from kind readers in a problem.In a php application,I have several options in the form of Checkboxes.Suppose there are 10 options. If I confine myself to only 2 or 3 options & if the options are consective,my mysql query is ok & works well.But if the items are chosen at random i.e option 1,option,3,option 5,option 7 etc, there are diffeculties in building mysql query.

$query="select option1,option3,option7 from table1 where option1 like '%Qadir%' ";

where option1,option2 option3 are fields from table1.

I hope someone will surely extend help.

with regards.

Abdul Qadir.

There are 4 replies in this thread, which are not being displayed.
Browsing this forum thread replies is available only to premium subscribers.

Go to the premium subscriptions page to learn how to become a premium subscriber and have full access to this forum.

For more information send a message to info at phpclasses dot org.