【发布时间】:2013-07-03 19:21:41
【问题描述】:
我正在尝试从相同 where 条件返回的多行中获取所有结果:
public static String getResult(String mycondition)
{
ResultSet rsData = sql.RunSelect("select col1 from my_table where con ='"+myCondition+"'");
if (rsData.next())
{
String result = rsData,getString("col1");
}
}
请注意,有一个 id 列可以区分这些行。 jsp 页面中的显示应该为返回的每一行创建文本字段。 有什么想法吗?
【问题讨论】: