John Thorne
|
| Posted: 04/05/2002, 5:28 PM |
|
php4 mysql
How can I get a listbox to show just a unique value from a table
100 records with maybe 5 different values in "State", I would like the value
box
to just show the 5 States, not 20 of each.
thanks
jrt
|
|
|
 |
Frank Rocco
|
| Posted: 04/05/2002, 6:28 PM |
|
I don't use mySQL, but try using the SQL "select distinct xxx from table"
syntax
HTH
Frank
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002
|
|
|
 |
John Thorne
|
| Posted: 04/06/2002, 3:44 AM |
|
This almost works
SELECT DISTINCT datatable.state FROM datatable
Produces a dropdown listbox of showing 5 values, but they are blank
jrt
"Frank Rocco" <farocco@hotmail.com> wrote in message
news:a8lmg1$m6d$1@news.codecharge.com...
> I don't use mySQL, but try using the SQL "select distinct xxx from table"
> syntax
>
> HTH
>
> Frank
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002
>
>
|
|
|
 |
John Thorne
|
| Posted: 04/06/2002, 3:59 AM |
|
This works
SELECT DISTINCT state, state FROM datatable ORDER BY state ASC
jrt
"John Thorne" <john@jrthorne.com> wrote in message
news:a8mn3r$gq0$1@news.codecharge.com...
> This almost works
>
> SELECT DISTINCT datatable.state FROM datatable
>
> Produces a dropdown listbox of showing 5 values, but they are blank
>
> jrt
>
> "Frank Rocco" <farocco@hotmail.com> wrote in message
>news:a8lmg1$m6d$1@news.codecharge.com...
> > I don't use mySQL, but try using the SQL "select distinct xxx from
table"
> > syntax
> >
> > HTH
> >
> > Frank
> >
> >
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002
> >
> >
>
>
|
|
|
 |
|