I have an outside database of locations. They are associated with loc_id in the database.

I'd like to create a node that has some php code that would access the last number and use it as the loc_id such that the url would be something like:
node/23/15

where node/23 is the page and 15 would be the loc_id that I would just access via the arg function. Is this possible or is there a better way to go about it?

-j