Tuesday, March 7, 2017

Sample Display Count 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");
$row = mysql_fetch_array($result);

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

mysql_close($con);
?>

No comments:

Post a Comment

phprunner view custom filed status

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