我想插入用perl和CGI在数据库中的数据,但我有以下错误:未定义子程序&DB:连接叫在C:/wamp/bin/apache/apache2.2.22/cgi-bin/test.pl线13。
test.pl
sub change{
my $Data = {
table =>'student',
action => 'insert',
data => {
Name => 'LL',
Surname => 'GG',
Age => '20'
}
};
return Db::update($Data);
};
sub test {
my $Data = {
table =>'student',
action => 'insert',
data => {
Name => 'LL',
Surname => 'GG',
Age => '20'
},
};
return Db::insert($Data);
};
print test();
只是editet我的代码现在的打印效果:INSERT INTO学生(姓名,年龄)VALUES(LL,GG,20),但不会插入数据库表中的那些数据