今天写了个代码

<?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.

爪子下。。。下次不要犯这么弱智的错误

最新文章

  1. STM32命名原则
  2. [原] XAF 添加日期筛选下拉选择
  3. WPF学习之路(二) XAML(续)
  4. 浅析WPhone、Android的Back与Home键
  5. maven可选依赖(Optional Dependencies)和依赖排除(Dependency Exclusions)
  6. Codeforces 724C [坐标][乱搞][模拟]
  7. 几种web字体格式
  8. iOS 验证邮箱手机号格式
  9. Android webview实现上传图片的效果(图片压缩)
  10. yii表单
  11. 顺丰接口 api对接说明
  12. KALI 2.0优化
  13. crontab定时任务(centos)
  14. [LeetCode] Rectangle Overlap 矩形重叠
  15. Windows安装activemq
  16. vue中svg图标使用
  17. sql语句中order by 多个字段同时排序的应用
  18. 洛谷P4234 最小差值生成树(LCT,生成树)
  19. 三种邻接表存图模板:vector邻接表、数组邻接表、链式前向星
  20. 2018.07.20 bzoj2152: 聪聪可可(点分治)

热门文章

  1. MDK 虚拟串口 *** error 30: undefined name of virtual register
  2. shell常用命令及正则辅助日志分析统计
  3. &lt;Python基础&gt;字符串的基本操作
  4. [SNOI2017]遗失的答案
  5. 最全Linux常用命令大全
  6. godaddy账号以及域名被盗找回经历以及网络信息安全的思考
  7. [CF587-F]WI-FI
  8. C++: inheritance
  9. lync sdk 二次开发
  10. System.Web.Mvc.ValueProviderResult.cs