$sth = $dbh->prepare($sql);
$sth->execute;
+ $sql = "ALTER TABLE `$tbl_bookmarks`
+ ADD COLUMN `linkcheck_status` int(1) NOT NULL AFTER `access_level`,
+ ADD COLUMN `linkcheck_date` int(10) NOT NULL AFTER `linkcheck_status`;";
+ $sth = $dbh->prepare($sql);
+ $sth->execute;
$sql = "update $tbl_options set value = ? where (name = ?)";
$sth = $dbh->prepare($sql);
$|=1;
my $opt_help = 0;
+my $opt_link = "all";
# if no arguments passed
&usage if @ARGV < 1;
GetOptions(
"help|h" => \$opt_help,
+ "link|l" => \$opt_link
) or die(&usage);
&usage if $opt_help;
#
# main
#
-my $query = "SELECT `url` ";
+my $query = "SELECT `url` FROM `$tbl_bookmarks`";
+$query .= " WHERE `linkcheck_status` = " if($opt_link == 1);
+$query .= " WHERE `linkcheck_status` = " if($opt_link == 0);
+print $query;
#