CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeCharge.Discussion

 List Box Question

Print topic Send  topic

Author Message
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
> >
> >
>
>


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.