Gossamer Forum
Home : Products : DBMan SQL : Discussion :

PLEASE, SELECT FIELD LIST SHOWing NON REPEATED DATA HOW?

Quote Reply
PLEASE, SELECT FIELD LIST SHOWing NON REPEATED DATA HOW?
CAN YOU HELP?
Frown

Do you know how do i do to make a dropdown from a column field of the database but listing only the data but non duplicates.


For example my table has a column called Status that can be set using checkboxes to Active or Inactive
so there are two possibilities for a record (Active or inactive) this is that every record has a active and inactive field column.

Now, my idea is make a dropdown that takes the data from the columns of the database that i know how to do it with this global but i cannot make it do not repeat in the list the data like:

active
active
active
Inactive.... and so on

many times....


this is what i am doing right now and it works but the problem is that the generated dropdown shows a list with Active and Inactive repeatly...acording the quantity of records in the table. So.... how can i just only mask this and show non duplicates in the list i mean just showing active and inactive option one time!
thanx



This is what i got now: see below: this create the list now but showing all with duplicates.....Frown

<!-- SEARCH BOX STATUS -->

<%bselect('t_phonec')%> <!-- Select from t_phonec table -->
<select name='phonec_status'> <!-- The Column Field phonec_name -->
<option value=''>--</option> <!-- Set initial -- dropdown search mask -->
<%loop loop_select%> <!-- Loop all the table records -->
<option value='<%phonec_status%>'><%phonec_status%> <!-- Make dropdown list of values and search list -->
</option>
<%endloop%>


********************************************************


I tried also to make it simply just adding a select option list without pulling data from the table column field above but is does not work to search and i do not know how to make search to work using this below form:

<select>
<option value=''>--</option>
<option value='Active'>Active </option>
<option value='Inactive'>Inactive </option>
</select>
KevinW ANDRE
webmaster@cyberbrickell.com
KevinW ANDRE
webmaster@cyberbrickell.com
Subject Author Views Date
Thread PLEASE, SELECT FIELD LIST SHOWing NON REPEATED DATA HOW? kevinws 4073 Feb 19, 2004, 1:15 PM
Thread Re: [kevinws] PLEASE, SELECT FIELD LIST SHOWing NON REPEATED DATA HOW?
ltillner 3955 Feb 19, 2004, 3:42 PM
Thread Re: [ltillner] PLEASE, SELECT FIELD LIST SHOWing NON REPEATED DATA HOW?
kevinws 3940 Feb 20, 2004, 6:56 AM
Thread Re: [kevinws] PLEASE, SELECT FIELD LIST SHOWing NON REPEATED DATA HOW?
604 3922 Feb 20, 2004, 9:52 AM
Thread Re: [TheStone] PLEASE, SELECT FIELD LIST SHOWing NON REPEATED DATA HOW?
kevinws 3915 Feb 20, 2004, 10:24 AM
Thread Re: [kevinws] PLEASE, SELECT FIELD LIST SHOWing NON REPEATED DATA HOW?
kevinws 3936 Feb 20, 2004, 10:57 AM
Thread Re: [kevinws] PLEASE, SELECT FIELD LIST SHOWing NON REPEATED DATA HOW?
kevinws 3933 Feb 20, 2004, 11:03 AM
Thread Re: [kevinws] PLEASE, SELECT FIELD LIST SHOWing NON REPEATED DATA HOW?
604 3955 Feb 20, 2004, 4:26 PM
Post Re: [TheStone] PLEASE, SELECT FIELD LIST SHOWing NON REPEATED DATA HOW?
qango 3884 Feb 26, 2004, 7:06 AM