Re: [請益] sql指令SOURCE 的用法
※ 引述《carrie0905 (認真的生活)》之銘言:
[恕刪]
: error message如下
: DBD::mysql::st execute failed: 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 'SOURCE qq{/home/carrie/ftpdownload/file_new/table.sqltable.sql}'
^^^ ^
: at line 1 at MirMAPs.pl line 74.
我想mysql應該不認識qq{}吧
雖然有點醜 但如果換成單引號 加上反斜線替代qq{}應該可行吧
像是
$source = "SOURCE \'/home/carrie/ftpdownload/file_new/table.sqltable.sql\'";
$dbh->prepare($source);
記得DBI好像有quote()可以用 不過我不確定合不合你的需求就是了
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.90.81
推
03/10 09:16, , 1F
03/10 09:16, 1F
→
03/10 09:17, , 2F
03/10 09:17, 2F
推
03/10 11:11, , 3F
03/10 11:11, 3F
推
03/10 13:07, , 4F
03/10 13:07, 4F
→
03/10 23:54, , 5F
03/10 23:54, 5F
推
03/11 10:41, , 6F
03/11 10:41, 6F
推
03/11 17:05, , 7F
03/11 17:05, 7F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):
Perl 近期熱門文章
PTT數位生活區 即時熱門文章