I'm stumped. I think we need help from a pro now :)
This is a shot in the dark but try this:
my $article = $DB->table('Articles')->select( ['Content'], { LinkID => $link_id } )->fetchrow;
my $sql = qq~INSERT INTO lsql_Links (ID, Title, LinkOwner,
Add_Date, Mod_Date, Description,
upload_id, isPremium,PremiumDescription)
VALUES ('', ?, 'new_admin', CURDATE(), CURDATE(), ? , ?, ?, ?)~;
my $sth = $dbh->prepare($sql);
$sth->bind_param(1, $hit->{Title});
$sth->bind_param(2, $article);
$sth->bind_param(3, $hit->{ID});
$sth->bind_param(4, $hit->{isPremium});
$sth->bind_param(5, $hit->{PremiumDescription});
$sth->execute() or die $DBI::errstr;
$sth->finish();
$dbh->disconnect();
There's got to be something in one of those error messages that you posted to tell you what's wrong. I just don't know enough about MySQL to tell you what it is :/
~Charlie
This is a shot in the dark but try this:
Code:
# first, we need to enter our values into lsql_Links my $article = $DB->table('Articles')->select( ['Content'], { LinkID => $link_id } )->fetchrow;
my $sql = qq~INSERT INTO lsql_Links (ID, Title, LinkOwner,
Add_Date, Mod_Date, Description,
upload_id, isPremium,PremiumDescription)
VALUES ('', ?, 'new_admin', CURDATE(), CURDATE(), ? , ?, ?, ?)~;
my $sth = $dbh->prepare($sql);
$sth->bind_param(1, $hit->{Title});
$sth->bind_param(2, $article);
$sth->bind_param(3, $hit->{ID});
$sth->bind_param(4, $hit->{isPremium});
$sth->bind_param(5, $hit->{PremiumDescription});
$sth->execute() or die $DBI::errstr;
$sth->finish();
$dbh->disconnect();
There's got to be something in one of those error messages that you posted to tell you what's wrong. I just don't know enough about MySQL to tell you what it is :/
~Charlie