主题:  如何做条件查询?

dayusky

职务:普通成员
等级:1
金币:0.0
发贴:77
注册:2002/7/5 23:42:07
#12002/7/6 14:28:53
如下图:选择下拉菜单选项即按其字段查询。




crystal_5d

职务:普通成员
等级:1
金币:0.0
发贴:34
注册:2001/1/25 0:23:39
#22002/7/8 2:08:01
select * from your_table
where table.field1 like 'your_condition'
ORDER BY table.field2 ASC(DESC)

定义your_condition变量,默认值 %,运行时:request.getParameter("form_field")


[center][code]I love MX Studio !~~[/code][/center]