我的下拉菜单中的值是根据数据库取得的,怎么让相同的数据只显示一个呢?
我的下拉菜单中的值是根据数据库取得的,怎么让相同的数据只显示一个呢?
<%
Alarm_OperatorInfo Info = new Alarm_OperatorInfo();
cAlarm_Operator data14;
String strSql1="SELECT * FROM alarm_operator WHERE (alarm_id = 1) ";
Info.OpenDb(strSql1);
<select multiple name="choiceBox" style="width:175;" size="30"><%
for(int j=0;j<Info.GetRecordCount();j++)
{
data14 = (cAlarm_Operator)Info.GetRecord(j);
%>
<OPTION ><%= data14.strIp_address %></OPTION>
<%}%>
</select>
这样取的数据有很多相同的值,怎么判断下要他显示一个呢?谢谢!