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

Variables in thinkphp where statement are not resolved

WBOY
Release: 2016-08-08 09:31:10
Original
1060 people have browsed it

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.

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