burningmantech / ranger-ims-mac

Ranger Incident Management System—Mac OS Client
Apache License 2.0
4 stars 2 forks source link

Radio ID check #41

Open wsanchez opened 10 years ago

wsanchez commented 10 years ago

Provide a quick way to check a radio ID and look up who it's assigned to.

wsanchez commented 9 years ago

To Stonebeard for some SQL fu

flwyd commented 9 years ago

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;