mysql api 不支持source命令
2024-09-06 10:30:36
今天写了个代码
<?php
.....
mysql_query("source /tmp/cr.sql",$link);
.....
?>
结果死活cr.sql的SQL语句就是没效果,查了下,
SOURCE is definitely a command that is preprocessed by the mysql client. The server does not understand that command. So you can't execute SOURCE on the server using the query API.
If you can restrict the content of your SQL script to exclude mysql client builtin commands, it might work to use mysqli::multi_query(). But it won't work for the full set of commands that are allowed in an SQL script.
爪子下。。。下次不要犯这么弱智的错误
最新文章
- STM32命名原则
- [原] XAF 添加日期筛选下拉选择
- WPF学习之路(二) XAML(续)
- 浅析WPhone、Android的Back与Home键
- maven可选依赖(Optional Dependencies)和依赖排除(Dependency Exclusions)
- Codeforces 724C [坐标][乱搞][模拟]
- 几种web字体格式
- iOS 验证邮箱手机号格式
- Android webview实现上传图片的效果(图片压缩)
- yii表单
- 顺丰接口 api对接说明
- KALI 2.0优化
- crontab定时任务(centos)
- [LeetCode] Rectangle Overlap 矩形重叠
- Windows安装activemq
- vue中svg图标使用
- sql语句中order by 多个字段同时排序的应用
- 洛谷P4234 最小差值生成树(LCT,生成树)
- 三种邻接表存图模板:vector邻接表、数组邻接表、链式前向星
- 2018.07.20 bzoj2152: 聪聪可可(点分治)
热门文章
- MDK 虚拟串口 *** error 30: undefined name of virtual register
- shell常用命令及正则辅助日志分析统计
- <;Python基础>;字符串的基本操作
- [SNOI2017]遗失的答案
- 最全Linux常用命令大全
- godaddy账号以及域名被盗找回经历以及网络信息安全的思考
- [CF587-F]WI-FI
- C++: inheritance
- lync sdk 二次开发
- System.Web.Mvc.ValueProviderResult.cs