看板 Perl 關於我們 聯絡資訊
小女不才,一直無法de出這個bug, 可不可以麻煩各位高手幫我看看呢? 拜託了!! ============== 這個部分主要是要建一個資料庫叫miRBase_130 也的確可以建起來, 接著想要利用 SOURCE這個指令把table.sql這個檔案塞入來建此資料庫的table 之後再一個檔案一個檔案塞入各個區域 ============== use DBI; use DBD::mysql; use strict; my $sth = $dbh->prepare("CREATE DATABASE miRBase_130"); $sth->execute(); $sth->finish; my $sth = $dbh->prepare("USE miRBase_130"); $sth->execute(); my $sth = $dbh->prepare("SOURCE qq{/home/carrie/ftpdownload/file_new/table.sql}"); $sth->execute(); $sth->finish; ========== 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. -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.174.13 ※ 編輯: carrie0905 來自: 140.112.174.13 (03/09 21:07)