Dhuan
04-10-2009, 04:05 AM
I tried to come up with a name for this topic, but with no sucess...
table people
|name |sex |age|occupation|
john m 30 cop
brian m 33 lawyer
ana f 28 lawyer
jack m 27 cop
max m 31 cop
What I want to do is, make the php show all occupation records, without repeating them. so it would be like this:
<select>
<option>cop</option>
<option>lawyer</option>
In other words, to make the php display all occupations avaiable.
Sure i could simply make the Mysql select all records from that table but then the occupations would repeat.
table people
|name |sex |age|occupation|
john m 30 cop
brian m 33 lawyer
ana f 28 lawyer
jack m 27 cop
max m 31 cop
What I want to do is, make the php show all occupation records, without repeating them. so it would be like this:
<select>
<option>cop</option>
<option>lawyer</option>
In other words, to make the php display all occupations avaiable.
Sure i could simply make the Mysql select all records from that table but then the occupations would repeat.