2
Sure just make certain your script can write to the db of choice.
You might be better off setting the php script outside of XOOPS and then using blocks to access the page.
Another option is to blend your XOOPS and non-xoops dbs.
It's easy to blend MySQL dbs... hard to get them apart later though!