Php : How To Use Mysqli Num Rows In Php

Php Code To Get Number Of Rows In Mysqli Result Using Mysql Database


________________________________________________________


In this Php Tutorial we will see How To Use mysqli_num_rows To Get Number Of Rows From Mysqli Result Using MySQL Database Table In With Php .

I Use In This Tutorial:
- NetBeans IDE .
- XAMPP .
- PhpMyAdmin .


 




Php Source Code:

<?php

// PHP Using mysqli_num_rows Function
// get number of data in mysqli result

$host = "localhost";

$user = "root";

$pass = "";

$database = "test_db";

$connect = mysqli_connect($host, $user, $pass, $database);

$query = "SELECT * FROM users";

$result = mysqli_query($connect, $query);

$numRow = mysqli_num_rows($result);

echo "<h1>".$numRow."</h1>";


///////////////OUTPUT:  16



                     




Share this

Related Posts

:)
:(
hihi
:-)
:D
=D
:-d
;(
;-(
@-)
:P
:o
:>)
(o)
:p
:-?
(p)
:-s
(m)
8-)
:-t
:-b
b-(
:-#
=p~
$-)
(y)
(f)
x-)
(k)
(h)
cheer