Jeff,
The first example worked perfectly, Thanks for the quick response
Jess
> -----Original Message-----
> From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]
> Sent: Friday, December 12, 2003 10:02 AM
> To: Hunter, Jess
> Subject: Re: How to keep multiple instances of the same information
> from being displayed
>
>
> Using DISTINCT will solve your problem
>
> SELECT DISTINCT userlastname, userfirstname FROM TABLE ORDER BY
> userlastname
> You could get this all out at once also by using CONCAT_WS
>
> **untested sql**
> SELECT DISTINCT CONCAT_WS(', ', userlastname, userfirstname) FROM TABLE
> ORDER BY userlastname
>
> HTH
> Jeff
>
>
>
>
>
>
> "Hunter, Jess"
>
> <[EMAIL PROTECTED] To:
> [EMAIL PROTECTED]
>
> RC.ORG> cc:
>
> Subject: How to keep
> multiple instances of the same information from being
> 12/12/2003 10:47 displayed
>
> AM
>
>
>
>
>
>
>
>
>
> Using PHP as the front end I am creating a form with a dropdown box that
> displays information from one table to be inserted into another table.
> That's PHP and I have gotten that part down with no issue.
>
> However, in the table a person could be listed multiple times and I only
> want a user to be listed a single time. for instance in the table I may
> have
>
> Jones, Jim
> Jones, Mary
> Jones, Mary
> Jones, Mary
> Jones, Nancy
> Jones, Paul
>
> when I do my SELECT I only want Mary Jones to show up a single time.
>
> Here is the code I am currently using within the Dropdown box:
>
> <SNIPPET>
> $Link = mysql_connect($Host, $User, $Password);
> $Query="SELECT * from $TableName ORDER BY userlastname";
> $Result= mysql_db_query ($DBName, $Query, $Link);
>
> while ($Row = mysql_fetch_array ($Result)){
>
>
> print ("<option value='$Row[userlastname],
> $Row[userfirstname]'>$Row[userlastname], $Row[userfirstname]</option>");
> }
> mysql_close ($Link);
> ?>
> </SNIPPET>
>
> As you can see I am pulling two fields from one table, then combining them
> to make a single field in another table. I am doing this to provide
> continuity when I create queries in the future.
>
> Any help with this would be greatly appreciated
>
> Jess
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.550 / Virus Database: 342 - Release Date: 12/9/03
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
>
>
>
>
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.550 / Virus Database: 342 - Release Date: 12/9/03
>
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.550 / Virus Database: 342 - Release Date: 12/9/03
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]