You should be using both mysql and php to check this.
mysql would hold the data, and php would be used to write the script.
You can have a tinyint field for 'car_availability.' And if it's 1, that means it's available, if it's 0, then it's not. Then on a page that displays all available cars, run a query like:
$query = "SELECT * FROM cars WHERE car_availability='1'"
Of course, you could would be more complex, but this is only a simple example.