标签: php replace
我有一个将作为查询执行的字符串,但是它具有between功能,如下所示:
between
BETWEEN '2019-01-01 AND 2019-01-31'
但是我需要用它替换它,以便PostgreSQL可以理解它:
BETWEEN '2019-01-01' AND '2019-01-31'
答案 0 :(得分:0)
我解决了:
$string = str_replace(" AND ", "' AND '", $string);