<?php
$h='localhost';$u='admin';$p='shah123Zaib';$d='ecommm';
$m=@new mysqli($h,$u,$p,$d);
if($m->connect_error){echo "ERR: ".$m->connect_error."\n";exit;}
echo "OK db=$d server=".$m->server_info."\n";
$r=$m->query("show tables");
while($x=$r->fetch_row()){ $t=$x[0]; $q=$m->query("select count(*) from `$t`"); $c=$q?$q->fetch_row()[0]:'?'; echo "$t\t$c\n"; }