This script retrieves the unqiue values of the 'make' column of the 'models' table and sends them as .json response. More...
Variables | |
if(isset($error) && $error==="db_access_failed") | try |
$makes = [] | |
while ( $row=$stmt->fetch(PDO::FETCH_ASSOC)) | |
This script retrieves the unqiue values of the 'make' column of the 'models' table and sends them as .json response.
$makes = [] |
if (isset( $error) &&$error==="db_access_failed") try |
while($row=$stmt->fetch(PDO::FETCH_ASSOC)) | ( | $row = $stmt->fetch(PDO::FETCH_ASSOC) | ) |
Loops through the query results and collects distinct makes into an array. Encodes the collected makes as a JSON array and outputs it.