繁体   English   中英

如何使用php删除表中特定数量的行

[英]how to delete particular number of rows in a table using php

如果我选择这些特定的行使用

select * from wp_posts where title like 'abc%'  

它显示行
现在我想使用 php 删除这些行
我可以这样做还是我错了
提前致谢

如果你让你的代码更完整一点会更有趣。 但基本上SQL命令如下:

delete from wp_posts where title like 'abc%'  

如果有激活密钥之类的敏感数据,则需要使用mysql的二进制函数来检查abc是否与ABC匹配。

使用这个:

delete from wp_posts where title like binary('ABC%')

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM