$inventory_list = "SELECT * FROM vehicles, inv_type
WHERE inv_type.inv_type_name = '$_GET[get_inventory]'
AND vehicles.inv_type_id = inv_type.inv_type_id
AND vehicles.vehicle_active = 1
ORDER by vehicles.$orderby, vehicles.$orderby2 $sortby
LIMIT $offset, $rowsPerPage";
The results are correct except it seems to only be sorting by the first value (vehicles.$orderby).
If I echo the values of $orderby and $orderby the values are as expected.
ssand wrote:The results are correct except it seems to only be sorting by the first value (vehicles.$orderby).
If I echo the values of $orderby and $orderby the values are as expected.
This will not be true. If you are first field in place, then the results will be sorted in asc or desc and asc by default. You might not have recognized it.
ssand wrote:The results are correct except it seems to only be sorting by the first value (vehicles.$orderby).
If I echo the values of $orderby and $orderby the values are as expected.
This will not be true. If you are first field in place, then the results will be sorted in asc or desc and asc by default. You might not have recognized it.