sub _db_delete {
my ($me, $db_args) = @_;
- $db_args->{submitter_type} = 1 unless defined $db_args->{submitter_type};
+ $db_args->{submitter_type} ||= 1;
my $sth = $me->{dbh}->prepare("delete from posts where fb_post_id = ? and submitter = ? and submitter_type = ?");
- warn $db_args->{fb_post_id};
- warn $db_args->{submitter};
- warn $db_args->{submitter_type};
+
$sth->bind_param(1, $db_args->{fb_post_id}, SQL_BIGINT);
$sth->bind_param(2, $db_args->{submitter}, SQL_VARCHAR);
$sth->bind_param(3, $db_args->{submitter_type}, SQL_INTEGER);
my $rv = $sth->execute();
- warn $rv;
-
my $ret = $rv ? $sth->rows : 0;
$sth->finish;