Graham Pearson
|
Posted: 07/27/2004, 4:31 PM |
|
While working with a listbox I am having a problem populating two
fields from one table in the text column. Does anyone have a solution
for this.
My one listbox I am trying to duplicate
<option value="#RecordID#">Last_Name, First_Name</option>
Where Last_Name and First_Name are 2 fields within my table and the
RecordID is the Primary Key.
Ideas?
---
Graham Pearson, System Administrator / Web Developer
Northern Indiana Educational Services Center
56535 Magnetic Drive, Mishawaka IN 46544
http://www.niesc.k12.in.us
|
|
|
Walter Kempees
|
Posted: 07/29/2004, 2:58 AM |
|
Assuming that you are building a listbox originally containing RecordID,
Last_Name.
Also assuming PHP, MySQL you could do your SQL like this:
Select RecordID, concat_ws('',First_Name,Last_name) as name from table
where..... order......
You would, nicely, end up with a list box containg id,name as needed.
"Graham Pearson" <gpearson@niesc.k12.in.us> schreef in bericht
news:ce6ojk$q2d$1@news.codecharge.com...
> While working with a listbox I am having a problem populating two
> fields from one table in the text column. Does anyone have a solution
> for this.
>
> My one listbox I am trying to duplicate
>
>
>
> <option value="#RecordID#">Last_Name, First_Name</option>
>
> Where Last_Name and First_Name are 2 fields within my table and the
> RecordID is the Primary Key.
>
>
>
> Ideas?
>
>
>
> ---
>
> Graham Pearson, System Administrator / Web Developer
>
> Northern Indiana Educational Services Center
>
> 56535 Magnetic Drive, Mishawaka IN 46544
>
> http://www.niesc.k12.in.us
|
|
|
|