I know how to use MySQL to calculate the differences of the value:
SELECT
tour_packages.quantity_total - tour_packages.quantity_used
AS slots
FROM tour_packages
But how do I set the answer of the calculation into PHP variable? Is this practice even possible?