I am updating an old site written in php 5.4 to php 7.4 and I am having trouble with this line...
Code:
$upcoming = mysql_result(mysql_query("SELECT COUNT(*) FROM `event` WHERE `approved`=1 AND (`startdate` >= '".$today."' OR `oge` > 0) "),0);
I tried this:
Code:
if ($result4 = mysqli_query($connection, "SELECT COUNT(*) FROM `event` WHERE `approved`=1 AND (`startdate` >= '".$today."' OR `oge` > 0) ")) { $upcoming = mysqli_num_rows($result4); }
but it gave the count as 1 instead of 422.
Not sure what I am doing wrong. Please can one of you php pros shed some light? Thanks.
Bookmarks