Home > Backend Development > PHP Tutorial > php框架 - 问一个cakephp sql 问题

php框架 - 问一个cakephp sql 问题

WBOY
Release: 2016-06-06 20:20:51
Original
1316 people have browsed it

我写的where条件其中有:
$arr_search['Baoming.limits '] = 'Baoming.ck_nums';
但是在cakephp中执行打印的部分sql:
Baoming.limits 'Baoming.ck_nums'

也就是 Baoming.ck_nums 这个字段被加上了单引号,查询的结果就不正确。怎样才能不让它自动加上单引号。
搞了半天没有解决,希望大神帮助。
谢谢

回复内容:

我写的where条件其中有:
$arr_search['Baoming.limits '] = 'Baoming.ck_nums';
但是在cakephp中执行打印的部分sql:
Baoming.limits 'Baoming.ck_nums'

也就是 Baoming.ck_nums 这个字段被加上了单引号,查询的结果就不正确。怎样才能不让它自动加上单引号。
搞了半天没有解决,希望大神帮助。
谢谢

已找到解决方法:
$arr_search[] = 'Baoming.limits Baoming.ck_nums';

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template