Home > Backend Development > PHP Tutorial > 关于ThinkPHP删除数据库记录的奇怪有关问题

关于ThinkPHP删除数据库记录的奇怪有关问题

WBOY
Release: 2016-06-13 12:32:31
Original
893 people have browsed it

关于ThinkPHP删除数据库记录的奇怪问题
我使用

M('data')->where('user=xiaoming')->delete();
Copy after login
删除数据库中data表中user为xiaoming的一条记录,但是我发现这条语句没有执行,删不了。可是我如果将用户名user改成数字的话,这条记录却是可以执行删除的,这是怎么回事呢,好奇怪。

如果直接在mysql里面输入delete语句的话,不管user是数字还是字母都可以删除

thinkphp sql 删除
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