database - PHP echo date and number from query -


hi have trying learn php writing little web app showing me sales data. have got query works have tested want echo datematched , number of rows/results found date. have far

<?php $con=mysqli_connect("host","user","password","database"); // check connection if (mysqli_connect_errno())   {   echo "failed connect mysql: " . mysqli_connect_error();   }  $result = mysqli_query($con,"select * matched datematched in (     select datematched matched group datematched having count(*) > 1");  while($row = mysqli_fetch_array($result))    {   echo "['";  echo "" . $date['datematched'] . "', ";   echo "" . $num_rows . "],";     }  mysqli_close($con); ?> 

i know doing wrong here. ryan

edit:

<?php $con=mysqli_connect("host","user","password","database"); // check connection if (mysqli_connect_errno())   {   echo "failed connect mysql: " . mysqli_connect_error();   }  $result = mysqli_query($con,"select * matched datematched in (     select datematched matched group datematched having count(*) > 1");    echo "['";  echo " 16/08/2013 ', ";   echo "12345}],";   mysqli_close($con); ?> 

okay have checked echo , work put in data need find way of getting information of datematched has been found , number of rows has been found that. ryan

first of need make adjustment query, has number of rows expecting.

$result = mysqli_query($con,"select datematched, count(*) num_rows "        . "from matched group datematched having num_rows > 0"); 

then can display data follows

while($row = mysqli_fetch_array($result)) {  echo $row['datematched'] . ",";  echo $row['num_rows']; } 

Comments