网站开发与移动开发

博客园 首页 新随笔 管理

2009年9月6日 #

摘要: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=g 阅读全文
posted @ 2009-09-06 19:13 txf2004 阅读(134) 评论(0) 推荐(0)

摘要: web开发中的多条件查询处理技巧1则 select * from t_test where f1=#param1# and (f2>#param2# or f3<#param3#) 如果输入参数为空,则相应的条件用恒等式代替,如1>0 当param2为空时(null或“”) 上述语句变为 select * from t_test where f1=#param1# and (1>0 or f3<#param3#) 这样就不用关心括号,and ,or了, 只要一开始把条件都写全就OK了 sql = "select * from t_test where f 阅读全文
posted @ 2009-09-06 19:11 txf2004 阅读(240) 评论(0) 推荐(0)