+ -
当前位置:首页 → 问答吧 → 为什么数组的字符串到where里就变成数字

为什么数组的字符串到where里就变成数字

时间:2011-09-18

来源:互联网

数组内容为:array(1) {  ["date"] => array(2) {    [0] => string(7) "between"    [1] => array(2) {      [0] => string(10) "2011-07-26"      [1] => string(10) "2011-08-25"    }  }}加到where($date)里就变成:

WHERE ( (`date` BETWEEN 2011-07-26 AND 2011-08-25 ) )

请问,如何改成

WHERE ( (`date` BETWEEN '2011-07-26' AND '2011-08-25' ) )?????

作者: kan   发布时间: 2011-09-18

你试着将数组中的数据写为array("'2000-11-11'","'2000-11-11'")试试,就是前后增加'符号

作者: yougl   发布时间: 2011-09-19

热门下载

更多