Trying to return the total row count for a sql table. My code returns the number of rows that are added not the total number of rows in the table. Any suggestions?
PHP:
require(ROOT_PATH . "inc/database.php");
try {
$query = $db->prepare("REPLACE INTO launch_email VALUES ('$email')");
$query->execute();
$count = $query->rowCount();
echo $count;
} catch (Exception $e) {
echo "Data could not be submitted to the database.";
exit;