PDA

View Full Version : Query from board B to board A.


kleinschwanz
09-11-2008, 06:58 PM
Query from board B to board A. Is this possible and how?

Ok to explain it before there is many questions.

I am planning to use two boards in near future, as the one-board system userright elements and will not grip in this case.

Board B should only register on invite AND when the invited user has same email with a certain postcount (or maybe activity level) in board A. I have a good old invite hack working and I only need the information if it is possible to do this query from one board to another and how.

Thank you for your patience

Eikinskjaldi
09-11-2008, 10:29 PM
If both boards are on the same mysql server then all you have to do is prefix tables with the database name

e.g.

Select blah from database1.table1
join database2.table1
on (database1.table1.id = database2.table1.id)

If the mysql servers are on different machines then you will need to replicate the vb DB class and set the second up to talk to that machine. You cannot cross query directly in that instance, but you could use php as an intermediate

$db1stuff = select blah from db1
$db2 stuff = select blah from db2 where field in ($db1stuff)

kleinschwanz
09-12-2008, 11:22 AM
thanx a lot :D I will try to get that in my brain LOL