$stmt=$conn->prepare("SELECT DATE_FORMAT(startPeriod, '%b, %Y') as startPeriod, DATE_FORMAT(endPeriod, '%b, %Y') as endPeriod, grade, course FROM edu ORDER BY startPeriod DESC;");
$stmt->execute();
// set the resulting array to associative
$result=$stmt->fetchAll(PDO::FETCH_ASSOC);
if($result)
{
return$result;
}
else
{
returnarray(array("errorMessage"=>"Error, edu data not found"));
$stmt=$conn->prepare("SELECT DATE_FORMAT(startPeriod, '%b, %Y') as startPeriod, DATE_FORMAT(endPeriod, '%b, %Y') as endPeriod, companyName, area, title FROM work ORDER BY work.startPeriod DESC;");