php-db | 2001011
Date: 01/04/01
- Next message: Louis Bertrand: "[PHP-DB] Re: [PHP] pg_shadow???"
- Previous message: Julio Cuz, Jr.: "[PHP-DB] pg_shadow???"
- In reply to: Dave Carrera: "[PHP-DB] Need to send a variable to part of a MySql query"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Why not in your query select distinct. "select distinct town from places"...
-Jim
----- Original Message -----
From: "Dave Carrera" <dave <email protected>>
To: <php-db <email protected>>
Sent: Thursday, January 04, 2001 12:31 PM
Subject: [PHP-DB] Need to send a variable to part of a MySql query
> 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 ;-)
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe <email protected>
> For additional commands, e-mail: php-db-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
>
>
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Louis Bertrand: "[PHP-DB] Re: [PHP] pg_shadow???"
- Previous message: Julio Cuz, Jr.: "[PHP-DB] pg_shadow???"
- In reply to: Dave Carrera: "[PHP-DB] Need to send a variable to part of a MySql query"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

