I have a two table setup:
Status (A for Open, B for Assigned, O for Out of Office, R for Returned)
LaptopID (linked to table below)
Basically, users will be able to enter requests into the database. We then choose a request and assign an available laptop. So, once I choose a request, I need a SQL query to only return any laptops that are available for that time period (meaning they have not been assigned or are not out of the office). I have no clue where to begin on this one. I have some ideas that would work in Cold Fusion. However, I would like to try and do this completely with a SQL query that only returns the LaptopIDs that have not been assigned for that time period.
Is this possible? Or, do I need to change my table structure?