Open wsanchez opened 10 years ago
To Stonebeard for some SQL fu
Get the ID for a particular radio: SELECT id FROM asset WHERE YEAR(create_date) = YEAR(NOW()) AND barcode = '...'; Optionally, (AND description = 'Radio') or (AND description = 'Vehicle') Who has that asset checked out? SELECT person_id FROM asset_person WHERE asset_id = ... AND checked_in IS NULL;
Provide a quick way to check a radio ID and look up who it's assigned to.