bespokeappstt
Hubstaff freelancer
I have a dbjoin with a nested query. I want the multi-select drop down to order the numbers. The parent list element is rad_serialassets___serial_number and the list with the dbjoin is rad_rentals___serial. First I tried:
The I tried
None of them work. Using {thistable}.serial throwed an error and the page didin't even load. How can I order those numbers in the drop down?
Code:
WHERE {thistable}.id IN (SELECT a.id FROM rad_serialassets AS a LEFT JOIN rad_rentals_repeat_serial AS b ON a.id = b.serial WHERE b.parent_id = "{rad_rentals___id_raw}") OR {thistable}.available = 1 order by "{rad_rentals___serial_raw}" DESC
Code:
WHERE {thistable}.id IN (SELECT a.id FROM rad_serialassets AS a LEFT JOIN rad_rentals_repeat_serial AS b ON a.id = b.serial WHERE b.parent_id = "{rad_rentals___id_raw}") OR {thistable}.available = 1 order by "{rad_serialassets___serial_number_raw}" DESC