CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Unique values into listbox to search [Resolved]

Print topic Send  topic

Author Message
alfonso

Posts: 121
Posted: 05/29/2008, 10:31 PM

I fill a listbox with values of a table, but I don't want to repeat several identical values. For example, if I have: dog, cat, lion, cat, dog I don't want to appears all. I only want to appears cat, dog, lion.

Codecharge Studio 4. Thanks
View profile  Send private message
ReneS

Posts: 225
Posted: 05/30/2008, 1:23 AM

Hi,

Fill your listbox with a "DISTINCT" query. Then you will have unique values.

Rene
View profile  Send private message
alfonso

Posts: 121
Posted: 05/30/2008, 1:32 AM

Where exactly?. I select listbox. I go to properties -> Data. And where must I write this? What value must have inito Data Source Type and into Data Source?

Thanks again
View profile  Send private message
wkempees


Posts: 1679
Posted: 05/30/2008, 2:02 AM

@ alfonso
The Lisbox's properties, click the DataSource [...]
Will show SELECT.... FROM..... WHERE in left pane.
Click SELECT, lower pane will either show a * or fieldname
IF * chan ge it to DISTINCT(fieldname) if fieldname just click it, press F2 to edit and add DISTINCT( ) around it.
You ight need to fill the ALIAS field with the original fieldname
Press SQL icon to show the SQL it should start with
SELECT DISTINCT(fieldname) as fieldname FROM....................

Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message
alfonso

Posts: 121
Posted: 05/30/2008, 10:22 AM

It is correct. OK
View profile  Send private message
wkempees


Posts: 1679
Posted: 05/30/2008, 11:29 AM

Plesae change title to [Resolved]..........
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message

Add new topic Subscribe to topic   


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

Web Database

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.