Tuesday, March 7, 2017

sELECT bY cATEGORY PHP MYSQL


<?php
$con = mysql_connect("localhost","root","");
if (!$con) {
  die('Could not connect: ' . mysql_error());
}

mysql_select_db("archive", $con);

$result = mysql_query("select count(1) FROM archive WHERE Category='REPORT'");

$row = mysql_fetch_array($result);

$total = $row[0];
echo "Total Data: " . $total;

mysql_close($con);
?>
http://www.kavoir.com/2010/05/simplest-php-hit-counter-or-download-counter-count-the-number-of-times-of-access-visits-or-downloads.html

No comments:

Post a Comment

phprunner view custom filed status

if ($value=="Process") $str.='<img src="1.png">'; if ($value=="Receive") $str.='<i...