I am in need of some help when it comes to selecting from my MySQL database.
I hope what I am asking makes sense to you (I am confused to the point where I'm not sure how to ask the question).
I have a table with several options to choose from. Everything is working fine when I run a simple query like the following...
$query = "SELECT * FROM tblSubmit Where $class='yes'";
$class is defined on the submit FORM where they select a certain magazine. The results list everyone in the database that sells the magazine that they choose.
However, I would like to be able to run a query where they can select multiple arguments such as stores that accept cash, credit cards, ship mail order... etc. So my query would look something like...
$query = "SELECT * FROM tblSubmit Where $class='yes' AND cash=$cash AND credit=$credit AND ship=$ship";
$cash, $credit, $ship are all defined on the submit FORM and will come over in values of yes/no (just as they are in the database). $class will come over as a magazine name.
I cant for the life of me figure out how to write this query. Any help would be appreciated.
Regards,
nibbi