<?php
$con = mysql_connect('localhost', 'root', '');
$db = mysql_select_db('test', $con);
$data = mysql_query('SELECT COUNT(price) as result, price as price FROM products GROUP BY price');
while($r = mysql_fetch_array($data))
{
echo $r['price'].'--'.$r['result'] .'<br>';
}
$con = mysql_connect('localhost', 'root', '');
$db = mysql_select_db('test', $con);
$data = mysql_query('SELECT COUNT(price) as result, price as price FROM products GROUP BY price');
while($r = mysql_fetch_array($data))
{
echo $r['price'].'--'.$r['result'] .'<br>';
}
?>
New Zealand ETA
ReplyDelete