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($words[0],$words[1]) 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..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;}
Thanking you,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.
In reply to Re^4: split a line into 2 variables and store in SQL
by sharan
in thread split a line into 2 variables and store in SQL
by sharan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |