The stupid question is the question not asked | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
$dbh = DBI->connect("dbi:mysql:db","","") or die "Error db1";
$sth = $dbh->prepare("select max(id) from tracker where agent='abc'"); $sth->execute; $newid = $sth->fetchrow_array; $sth->finish; if($newid eq '') { $newid = 1; } else { $newid++; } $msubject = $fr{subject}; $msubject =~ s/\'/\\'/g; $sth = $dbh->prepare("insert into tracker values ( 'abc', $newid, '$msubject', '$todaydate', '$emailto', $sntcount, 0, 'eCard', '' )"); $sth->execute; $sth->finish; $dbh->disconnect; That is the code... How come it doesn't write simultaneously? Any ideas? In reply to Re: Issue with simultaneous MySQL actions
by Anonymous Monk
|
|