Lines 50-56
if ($action eq 'add') {
Link Here
|
50 |
$sth->execute($params->{'source'}, $params->{'text'}); |
50 |
$sth->execute($params->{'source'}, $params->{'text'}); |
51 |
if ($sth->err) { |
51 |
if ($sth->err) { |
52 |
warn sprintf('Database returned the following error: %s', $sth->errstr); |
52 |
warn sprintf('Database returned the following error: %s', $sth->errstr); |
53 |
exit 1; |
53 |
exit 0; |
54 |
} |
54 |
} |
55 |
my $new_quote_id = $dbh->{q{mysql_insertid}}; # ALERT: mysqlism here |
55 |
my $new_quote_id = $dbh->{q{mysql_insertid}}; # ALERT: mysqlism here |
56 |
$sth = $dbh->prepare('SELECT * FROM quotes WHERE id = ?;'); |
56 |
$sth = $dbh->prepare('SELECT * FROM quotes WHERE id = ?;'); |
57 |
- |
|
|