Fetch data from another site, but the same database

If you intend the process to be portable, then don’t use the database. Modify the theme to reply with either raw-html or php-serialized data and just do an http crossload.

If this is a one-time install and you don’t care at all about portability, then just hardcode the query.

I’ve done both at one point or the other, there isn’t much difference in implementation time. The queries occasionally have to be redone after an upgrade.