Home  >  Article  >  Backend Development  >  Variables in thinkphp where statement are not resolved

Variables in thinkphp where statement are not resolved

WBOY
WBOYOriginal
2016-08-08 09:31:10964browse

Solution: Just enclose the variables in the where statement in single quotes. It can be used for personal testing

Example: Change $System->where("keywords=$keywords")->find(); to $ System->where("keywords='$keywords'")->find(); can

Reason: unknown

The above has introduced the non-parsed variables in the thinkphp where statement, including the content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
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
Previous article:Small bug resolutionNext article:Small bug resolution