Commit Diff
--- index.php +++ index.php @@ -16,7 +16,7 @@ function db_connect() { } function count_urls($dbh) { - $sth = $dbh->query("SELECT id FROM ". DB_TABLE); + $sth = $dbh->query("SELECT COUNT(*) FROM ". DB_TABLE); return $sth->fetchColumn(); }
--- index.php +++ index.php @@ -16,7 +16,7 @@ function db_connect() { } function count_urls($dbh) { - $sth = $dbh->query("SELECT id FROM ". DB_TABLE); + $sth = $dbh->query("SELECT COUNT(*) FROM ". DB_TABLE); return $sth->fetchColumn(); }