Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
$query = mysql_query("SELECT COUNT(*) FROM users") or die (mysql_error());
$result = mysql_fetch_row($query);
echo $result[0];
<?php
$connect = mysql_connect('localhost', 'root', '')
or die("Could not connect to a database. ".mysql_error());
mysql_select_db("test", $connect)
or die("Could not select a database. ".mysql_error());
$result = mysql_query("SELECT sex, COUNT(sex) as total FROM users GROUP BY sex")
or die("Could not complete a query. ".mysql_error());
while($row = mysql_fetch_array($result)) {
echo $row['sex'].": ".$row['total']."<br />";
}
?>