由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - perl用DBI操作MySQL出错的问题
相关主题
Perl插入MySQL中双引号的问题perl eval and if
Help: a Perl script question, Thanks (转载)Perl/MySQL下fetchrow出错
Perl DBI比python的MySQLdb快吗?fork(): why both if and else are executed?
A Software Intern Position Open / Palo Alto (转载)GO似乎是目前最难反编译的代码了
《Apache+MySQL+memcached+Perl开发高速开源网站》[PDF]g++ problem!!!!
Perl, PHP, Pathon, 那个好?new了指针,delete的时候出错了
请问用什么语言合适perl monk (ascii art)
问C++文件路径的问题Usage of Grep???help!!!
相关话题的讨论汇总
话题: perl话题: 出错话题: dbi
进入Programming版参与讨论
1 (共1页)
c**y
发帖数: 2282
1
在执行这句的时候:
$sth->execute($file,$comments);
如果由于数据库方面的原因出错,(例如主键重复),perl方面将给出一个出错信息并
退出。但是我不想让perl退出啊,该怎么办?
t****t
发帖数: 6806
2
eval { no warnings 'all'; $sth->execute(...) };
if ($@) {
# process the error
}

【在 c**y 的大作中提到】
: 在执行这句的时候:
: $sth->execute($file,$comments);
: 如果由于数据库方面的原因出错,(例如主键重复),perl方面将给出一个出错信息并
: 退出。但是我不想让perl退出啊,该怎么办?

1 (共1页)
进入Programming版参与讨论
相关主题
Usage of Grep???help!!!《Apache+MySQL+memcached+Perl开发高速开源网站》[PDF]
[转载] 在CGI程序中有何好方法返回HTMLPerl, PHP, Pathon, 那个好?
perl array|hash question请问用什么语言合适
perl:里有象 c assert 的东西吗?问C++文件路径的问题
Perl插入MySQL中双引号的问题perl eval and if
Help: a Perl script question, Thanks (转载)Perl/MySQL下fetchrow出错
Perl DBI比python的MySQLdb快吗?fork(): why both if and else are executed?
A Software Intern Position Open / Palo Alto (转载)GO似乎是目前最难反编译的代码了
相关话题的讨论汇总
话题: perl话题: 出错话题: dbi