Join static file xml with ID field with Database table ID field
What would be easiest probably is to build a string list of the IDs that you need to filter on, in PHP first, and pass that in as a parameter to a procedure that uses that parameter with the FIND_IN_SET() function like so:
SELECT *
FROM SomeOtherTable
WHERE FIND_IN_SET(IdField, IdListParameter)