Hi Moritz,
Infact its partially working...
Actually i am trying to transfer the data twice to the sql... my code is something like this:
if(condition1){
@words = split(/=/, $_);
print "$_";
$sth->execute($words[0],$words[1]) or die $DBI::errstr;
}
if(condition2){
@words = split(/=/, $_);
print "$_";
$sth->execute($words[0],$words[1]) or die $DBI::errstr;}
For the condition1 its working fine.. But as soon as i try with condition2 it shows some error abt missing curl bracket in some other loop.
But if i try to use $_, $_ in second condition its works fine. Dont knw wats the problem is..
if(condition1){
@words = split(/=/, $_);
print "$_";
$sth->execute($words[0],$words[1]) or die $DBI::errstr;
}
if(condition2){
@words = split(/=/, $_);
print "$_";
$sth->execute($_,$_) or die $DBI::errstr;}
Infact if i use $words[0], $_. Then also it does not show any error. But as soon as I try with $words[0], $words1, it starts showing the error..
DBD::mysql::st execute failed: Column 'name' cannot be null at ./fsm0.
+pl line 110, <> line 170.
Column 'name' cannot be null at ./fsm0.pl line 110, <> line 170.
Thanking you, |