CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Two DB fields in Listbox pull down

Print topic Send  topic

Author Message
xbill99
Posted: 04/22/2005, 10:57 AM

What is the best way to pre-populate a list box with
two database fields?

I have the user first name and last name as seperate columns- but I want to show them both together as options for the standard list box control.

thanks,
-bill
xbill99
Posted: 04/22/2005, 11:17 AM

Found one solution using custom SQL, CONCAT, and SQL alias.

Go to the standard listbox control- change the settings to SQL.

Edit the SQL for the list box and change the SQL to something like:

SELECT CONCAT(last_name,', ',first_name) AS full_name
FROM mytable ORDER BY full_name;

then use the full_name alias in the control.

are there any other ways to do this?

thanks,
-bill
peterr


Posts: 5971
Posted: 04/22/2005, 11:47 AM

This looks like most popular topic on the forums :-)
Here are various related discussions & solutions:
http://forums.codecharge.com/posts.php?post_id=11971
http://forums.codecharge.com/posts.php?post_id=34530
http://forums.codecharge.com/posts.php?post_id=15499
http://forums.codecharge.com/posts.php?post_id=20115
http://forums.codecharge.com/posts.php?post_id=23491
http://forums.codecharge.com/posts.php?post_id=43609
http://forums.codecharge.com/posts.php?post_id=44114
http://forums.codecharge.com/posts.php?post_id=44390
http://forums.codecharge.com/posts.php?post_id=44857
http://forums.codecharge.com/posts.php?post_id=49936
http://forums.codecharge.com/posts.php?post_id=50447

_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
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.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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