Custom Database: Multiple Tables

Is it possible to set a user list for Openfire from several tables (inside the same db)? Using MySQL.

I’ve tried with a single query on openfire.xml and then on the username and email fields to put, for example, “table1.username,table2.username”, but it didn’t work.

I would like to know if there is any way of doing this or if I really have to join the tables in a single one.

Thanks in advance.