I need to update a variable named $count
(in the below code) automatically. When my database update, $count
be update immediately because i need to use value of $count
in android app so i can't refresh count.php
file every time.
<?php
$con=mysql_connect("","","");
mysql_select_db("u607509006_bd1",$con);
$query = "select * from content where status='a'";
$result = mysql_query($query);
$count = mysql_num_rows($result);
echo $count;
mysql_close($con);
?>