User Element Plugin - Cross Database

burghard

Member
I need the user element plugin for a cross database join because all my data for fabrik are in a different database for my installation (not the joomla database). I would contribute code to it, if I get a pointer to the code (probably in the database join element plugin code).
In http://fabrikar.com/forums/index.ph...d-in-numeric-not-user-name.45611/#post-235183 cheesegrits states that the dbms MySQL does not support cross database joins. But this seems not to be true since the SQL command
SELECT * FROM this_database.table_1 t1
JOIN that_database.table_2 t2 ON t2.column= t1.column

works well as stated in https://stackoverflow.com/questions/1972943/how-do-i-construct-a-cross-database-query-in-mysql.
So can anyone give me a pointer to the code?
 
Last edited:
The reason I said "it doesn't support" cross database joins is that this is a version dependent feature (older MySQL versions don't allow it), and it also requires both databases to have the same access credentials (same user and password). This makes it problematic to support in Fabrik.

As for the code involved ... this is one of those "if you need to ask where the code is, you probably won't be able to modify it" cases. I took a look a while back at extending the join / user elements to support cross database joins, and gave up, because of the huge amount of changes required.

-- hugh
 
With "a pointer to the code" I rather mean if it is code in the user element plugin or the databasejoin element because user inherits from databasejoin. I even found some strange behaviour with the databasejoin element between two databases.
Nevertheless! Let me try it. I found PlgFabrik_ElementUser::getAsField_html(...) to create the SQL query for the select of the value. There a distinction between "same db" and "NOT same db" is made ($this-inJDb()). May be this is the right place to start for me?
 
Last edited:
Oops! I posted it on Joomla 2.5 forum. but I am on 3.7 can this thread been switched to the Joomla 3.x forum?
 
Moved.

That would be one place to start. But as I said, the last time I looked at doing this, I discovered many, many layers of complexity and issues that I hadn't anticipated. You are of course welcome to work on it, but I be aware that I suspect it won't be simple.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top