How to count the row of MySQL database using PHP with PDO

preview_player
Показать описание
Hey guys in this video I'm just showing you, How to count the number of rows of MySQL using PHP with PDO.
Basically in this video,
I'm making a function which is using a public function where I using an integrated function which name is rowCount();
thanks for watching this video and if you want to connect with me then join my WhatsApp group -
Рекомендации по теме
Комментарии
Автор

You not counting them in SQL, you counting them in PHP instead. Fetching all the records just to count them?! There's COUNT function in SQL for this task.

Channel-qrmh
Автор

Thanks a lot, but this function is undefined if I am trying to echo it from another page?

KaterinaCotten
Автор

kindly complete the ecommerce series sir

salmanbutt
Автор

hi there the function rowCount didnt count my total data in my database correctly. it displayed 0 although the table already got data in it.

dinieh