Hey,
So I'm trying to get messages from contact table and where is_read = 0.
My code is:
But when I
returns nothing.
Any clues why?
So I'm trying to get messages from contact table and where is_read = 0.
My code is:
PHP:
$countMSG = $db->prepare("SELECT COUNT(*) FROM contact WHERE is_read = 0");
$countMSG->execute();
$countMSG = $countMSG->fetchAll();
foreach ($countMSG as $row) {
$numMSG = $row[0];
}
PHP:
echo $numMSG;
Any clues why?