Forum Moderators: coopster
if($result ->num_rows>0)
{
$rows=array();
while($row=$result->fetch_assoc())
{
$rows[]=$row;
}
echo json_encode($rows);
} which is saved in the YYYY/MM/DD format to make MYSQL happyNot sure I understand this... MySQL saves date values as a date value (several options). Whether you display a particular value as YYY/MM/DD or M/D/YY or YYYY-MM-DD is completely independent of storage. And if you sort the query in ascending (default) order, you'll get 3/19 before 4/20.