php - Multiple WHERE conditions in SQL query -


i have students details in database. php firstname lastname dob gender status (active, not active) fee_paid

i have search form on views want use search students based on different conditions.

for example, may want search these 1. female students born between date1 date2 , have paid x amount of fees. 2. students called ali have paid x amount of fees. 3. active students have not paid fees.

my question, how can check, if field set, use in query, otherwise don't include in query. dob, search date range.

use isset() , loops compile sql-query. check post: search mysql database multiple fields in form


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

Swift game error message -