voxter
Posts: 3
|
| Posted: 01/25/2006, 6:14 AM |
|
To start from the very beginning :
1. There are 2 user groups - members (group_id=2) and non-members (group_id=1)
2. I have a registration form in which applicants need to chose a refferal from members listed in the database with the help of a listbox.
My query looks like that
SELECT first_name, last_name FROM users WHERE group id > 1
What I get is the last name listed in the listbox and the first name inserted in the refferal field in the database.
I would appreciate any suggestions. Thanks
|
 |
 |
mamboBROWN
Posts: 1713
|
| Posted: 01/25/2006, 7:42 AM |
|
voxter
I am assuming that you are using PHP and MySQL. Here is one possible solution. Use this select statement instead:
Select id, concat(first_name,' ',last_name) as member from users where group id > 1
In the SQL statement the field id is the memeber id (which you can store in the bound column-for the listbox). The field member is a concatenation of first and last name (which you can display in the Text Column of the listbox). Hope this helps...
|
 |
 |
voxter
Posts: 3
|
| Posted: 01/26/2006, 12:57 AM |
|
this time i can't even get any listings in the listbox... But maybe I just did something wrong (I am not very proficient with PHP and MySQL), so I would appreciate if you described the situation a little more detailed
|
 |
 |
voxter
Posts: 3
|
| Posted: 01/26/2006, 1:23 AM |
|
Got it... Thank you very much...
|
 |
 |
mamboBROWN
Posts: 1713
|
| Posted: 01/26/2006, 6:48 AM |
|
No problem voxter. Enjoy!!!!
|
 |
 |
|