PHP Dynamic Sort of mySQL Results

Job ID: 37621225

Budget: $10 – $11 USD

I have the attached report in PHP that is generated by a query in mySQL based on date. I want to dynamically sort the reports by the headers in the report. I need to keep the report in the same format. There should be carats to sort the columns ascending and depending. Below is the mySQL as well.


$dbRegionImpact = mysqli_query($conn, "SELECT COUNT(*) AS Cars, SUM(Families), SUM(People), Zipcode, ZipCode_Detail.Zipcode_D, ZipCode_Detail.City, ZipCode_Detail.State, ZipCode_Detail.County
FROM Greeter_Detail

LEFT JOIN ZipCode_Detail ON Greeter_Detail.Zipcode = ZipCode_Detail.Zipcode_D

WHERE $dateRange
GROUP BY Zipcode");
Related categories: PHP JavaScript AJAX Software Architecture MySQL