- 论坛徽章:
- 0
|
原帖由 guap514 于 2009-8-14 15:42 发表
update table_name set col1='$a' where col2='$b';
这个是perl的问题么??
我贴一下代码,请大家帮我看一下:
my $dbhome = $ENV{"DB_PATH"};
if((!defined($dbhome) || ! -d $dbhome))
{
die("Do not define the env 'DB_PATH' or it does not exist\n");
}
my $db_ini = "$dbhome/db.ini";
$scm = new SumCommonModule();
$scm->connect_db($db_ini);
$cell_tch='1,2,3';
$cell_name='cell1';
$sql1={
update test_cell set test_cell.tch='$cell_tch' where test_cell.name='$cell_name';
};
$scm->execute_batch($sql1);
$scm->commit;
$scm->end;
错误信息:
Bareword found where operator expected at tch.pl line 72, near ""$cell_tch" where"
(Missing operator before where?)
syntax error at tch.pl line 72, near ""$cell_tch" where test_cell"
syntax error at tch.pl line 78, near "else"
syntax error at tch.pl line 82, near "}" |
|