我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

MySQL:未找到行时返回DELETE查询

When I try to DELETE something from MySQL database that does not exist the query returns TRUE.

I want to know when nothing is deleted. Do I need to have a previous query to find if there are rows to be deleted?

Is there a more simple way to do this? I mean, using a single query?

I'm using php to connect to the database with the mysqli_query() function.

Use mysqli_affected_rows function to find the number of records affected by the previous query.

近期文章

  • PHP和Wordpress - 将内容放在正确的列中
  • Joomla:从标签模块访问文章属性
  • 用户登录时更新mysql数据库中的列
  • 更改多个输入框时更新php变量
  • 使用PHP检测日历事件重叠冲突
  • Zend Framework存储修改类的方法?
  • Laravel orWhere()/ MySQL或查询需要很长时间
  • 将列从一个数组复制到PHP中的其他列
  • 在android chatapp中实现规则的最佳方法[关闭]
  • 使用codeigniter / php的实体属性值模型
  • for循环不会遍历PHP中的整个数组
  • 如何在PHP中返回number_format后添加文本?
  • Javascript重定向vs表单提交到php脚本
  • 使用zipArchive addFile()不会将图像添加到zip
  • 如何使用Jquery处理PHP生成的内容?
  • Silverstripe单元测试夹具文件无法正常工作
  • Cassandra PHP接口与CQL可用/计划?
  • 在项目中共享自定义PHP代码的最佳方式
  • Codeigniter通过单击按钮更改表单操作
  • 使用PHP和MySQL创建多维数组

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华