作者热门文章
- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
execute($st-6ren">
是否可以在 SELECT FROM sql 命令中使用动态值?
Database->prepare("SELECT bomb FROM ? WHERE id=?")
->execute($strTable,$strID);
结果:
Fatal error: Uncaught exception Exception with message Query error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near...
最佳答案
没有。表名不能作为查询的参数。您需要先构建查询字符串,将表名连接起来。
关于php - 按字符串选择表(FROM),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8609594/
我是一名优秀的程序员,十分优秀!