Question about creating a complex series of queries.
Posted: Sun Aug 19, 2007 9:24 am
Hello,
I first just want to start by thanking all of you who over the past few weeks have answered so many of my Newbie questions, with your help I have created my database and I'm currently creating my queries and dynamic webpages for them. Thank you all so much, you know who you are. This Forum is the best I've ever came across hands down. I promise when i become as proficient as the gurus on here to support this forum to the fullest.
My question:
I would like to create a query form, one which searches my database by most or all of the criteria that can be entered into the registration form.
For instance, lets say that the following fields are part of the registration (and they are, but there's plenty more)
First_name (full text searchable)
last_name (full text searchable)
Sex
DOB
active (enum Y or N)
Class (This field is on a seperate table)
It would be great if I could actually search by combination of fields, but I need to crawl before I can walk and I first need to understand how to search my DB by user input.
Where I'm at now in my learnig is how to create insert and update queries on my pages (php).
what I'm thinking is that I obviously need to create a loop with each condition being a query, but I don't know the syntax for using a variable in my query.
Any help given would be greatly appreciated.
I first just want to start by thanking all of you who over the past few weeks have answered so many of my Newbie questions, with your help I have created my database and I'm currently creating my queries and dynamic webpages for them. Thank you all so much, you know who you are. This Forum is the best I've ever came across hands down. I promise when i become as proficient as the gurus on here to support this forum to the fullest.
My question:
I would like to create a query form, one which searches my database by most or all of the criteria that can be entered into the registration form.
For instance, lets say that the following fields are part of the registration (and they are, but there's plenty more)
First_name (full text searchable)
last_name (full text searchable)
Sex
DOB
active (enum Y or N)
Class (This field is on a seperate table)
It would be great if I could actually search by combination of fields, but I need to crawl before I can walk and I first need to understand how to search my DB by user input.
Where I'm at now in my learnig is how to create insert and update queries on my pages (php).
what I'm thinking is that I obviously need to create a loop with each condition being a query, but I don't know the syntax for using a variable in my query.
Any help given would be greatly appreciated.