[請益] sql指令SOURCE 的用法
小女不才,一直無法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)
討論串 (同標題文章)
以下文章回應了本文:
完整討論串 (本文為第 1 之 2 篇):
Perl 近期熱門文章
PTT數位生活區 即時熱門文章