“MySql Count Rows Php” Réponses codées

PHP MySQL Count Rows

$q="select * from location where community='Zoo' AND status='1'";
$res=mysqli_query($con,$q);
echo mysqli_num_rows($res);
Victorious Vendace

MySql Count Rows Php

<?php
$con = mysqli_connect("localhost","root","","test");
if (!$con) 
{
  die('Could not connect: ' . mysqli_error());
}

$result = mysqli_query("select COUNT(*) FROM table");
$row = mysqli_fetch_array($result);

$total = $row[0];
echo "Total rows: " . $total;

mysqli_close($con);
?>
Chandan

mysql obtient le nombre de lignes php

$count_query = "select count(*) from users";
Rht

Réponses similaires à “MySql Count Rows Php”

Questions similaires à “MySql Count Rows Php”

Plus de réponses similaires à “MySql Count Rows Php” dans PHP

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code