Need to send a variable to part of a MySql query
| From: | Dave Carrera | Date: | Thu, 04 Jan 2001 20:31:50 +0000 |
| Subject: | Need to send a variable to part of a MySql query | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-5601@lists.php.net to get a copy of this message | ||
Hi All
Thanks JB for the link to get info about creating a dropdown list populated
with the contents of a field in my DB.
Now I need to send the selected item from the dropdown list created to a
query.
In other words my visitor selects lets say London from my created list and
London is then included in a query to select all from my table that inc
London.
In my db the town name is a must have field but my created list show ALL
instances of the town name, so my dropdown list looks something like this..
Choose a town
London
London
London
Cardiff
Dover
Dover
What I would like to know is how I can just show 1 instance of a towns name
if multiple exist in my db so the list looks like this...
Choose a town
London
Cardiff
Dover
Names used only for demonstration...
Any pointers or direct help with this is most appreciated.
Dave ;-)