I am trying to count total number of rows with the following code:
$countvideo = "SELECT count(id) FROM `videos`";
$countvideo_run = mysqli_query($connect, $countvideo);
if($countvideo_run){
$countvideo_result = mysql_result($countvideo_run, 0, 'count(id)');
}
but it shows me this error:
Warning: mysql_result() expects parameter 1 to be resource, object given in C:\xampp\htdocs\task\media ew\adminpanel.php on line 121
how can I count this?