I am trying to select fields with a condition and display their counts. The counts display in one server while the same code does not display ANY counts ($num01 and $rowno)in another server. Both servers have same PHP version (5.6) and same database structure. Please guide.
Following is my code -
$con=mysqli_connect($host,$user,$password,$dbname);
$sql="select num, ode_y from Topics order by num asc";
$result = mysqli_query($con,$sql);
$sql1="SELECT * from Topics ORDER BY num ASC";
$result1=mysqli_query($con,$sql1);
$rowno = mysqli_num_rows($result1);
<span>Total $rowno registered
topics</span>
while($row = mysqli_fetch_array($result))
{
$odey1= ($row['ode_y']);
$sql01="SELECT ode
from fltr2 AS s
INNER JOIN Register AS r ON s.sender=r.sender
and r.reg=0
and s.ode='$odey1'";
$result01 = mysqli_query($con,$sql01);
$num01=mysqli_num_rows($result01);
<div>Counts : ".$num01."</a>
</div>
}