踩坑記錄 input 使用需要注意的地方

2021-10-05 07:08:33 字數 675 閱讀 3972

多條件查詢中,表單有多個input,type型別為text,這種input沒有填入值的情況下傳參到後台的是乙個空字串「」,而非null。

我這裡寫的是判斷不為null,

select * from t_movie where 1 = 1

and published_time = #

and title like concat('%', #, '%')

and director like concat('%', #, '%')

and performer like concat('%', #, '%')

然後因為type為text型別的input,傳到後台預設的引數為乙個空字串"",所以不能達到我想要的效果。

然後我就在control中做了下面改動。

if("" == movie.gettitle())

movie.settitle( null );

if("" == movie.getdirector())

movie.setdirector( null );

if("" == movie.getperformer())

movie.setperformer( null );

Python Sphinx使用踩坑記錄

描述 使用 pip 安裝sphinx後,按照教程建立了乙個新的py檔案,如下 run.py defrun name this is how we run param name name of people who runs print name,is running 隨後新建乙個目錄,使用 sphi...

Python Sphinx使用踩坑記錄

使用 pip 安裝sphinx後,按照教程建立了乙個新的py檔案,如下 run.py def run name this is how we run param name name of people who runs print name,is running 隨後新建乙個目錄,使用 sphinx...

使用Calendar需要注意clear

date是前台傳的值,格式為2014 01 01的形式 如下的 是去date日期當月的最大天數日期 int month integer.parseint date.substring 5,7 取天數 int year integer.parseint date.substring 0,4 取年份 d...