Use xataface for running queries in two different db

Archived from the Xataface Users forum.

abandaband — Wed May 16, 2012 2:26 pm

Hi,

I have two queries (based on entry criteria) of a user, first query runs a db and 2nd query runs on another db using table info of first query, can Xataface be used to create a tool for these queries?

Also, user should be able to provide input on frontend.

Thanks in advance


shannah — Thu May 17, 2012 9:32 am

Xataface is only set up to use a single DB but there are workarounds.

  1. If you just need certain tables, you can create views the main db that refer to data in other databases. Then this view could be used just like any table - Xataface would have no idea that some of the data is coming from other databases.

  2. You can always create additional mysql connections in PHP and query those other databases using regular mysql_query() calls.

-Steve