Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<html>
<body>
<?
$connection=mysql_connect("localhost","user","password");
if (!$connection)
{
echo "Could not connect to server";
exit;
}
$db=mysql_select_db("test",$connection);
if (!$db)
{
echo "Could not connect to database!";
exit;
}
$sql ="SELECT * FROM xcart_categories ORDER BY category";
$mysql_result=mysql_query($sql,$connection);
$num_rows=mysql_num_rows($mysql_result);
if ($num_rows == 0)
{
echo "No records";
}
else
{
while ($row=mysql_fetch_array($mysql_result))
{
$cat=$row["categoryid"];
$products=$row["product_count"];
$name=$row["category"];
#Display Results
echo "$cat: $name: $products <br> ";
[blue]$noofprods="SELECT * FROM xcart_products WHERE categoryid=$cat";[/blue]
$noofprodsresult=mysql_query($noofprods,$connection);
$counted=mysql_num_rows($noofprodsresult);
mysql_query("UPDATE xcart_categories SET product_count=$counted");
echo "$counted <br>";
}
}# end of else
?>
</body>
</html>