- Posts: 4
- Thank you received: 0
Is there any way to pull data from two separate tables in the database and show them in one??
Please Log in or Create an account to join the conversation.
Hi,
you can create sql view and join tables together as you wish.
Then you show this view with TableJX.
Best regards,
Viljem
Please Log in or Create an account to join the conversation.
I want to keep the tables separate in the actual database though. Is there any way to search through multiple tables without actually combining them in the database and if so, how should I go about doing it?
- Michael
Please Log in or Create an account to join the conversation.
Hello Michael,
When you create a view on to tables they remain separate. With view you combine data from two (or more) tables, however they must have a connection (usually, but not neccessary, specified by foreign key). You create such view with by JOIN-ing - for example:
CREATE VIEW TABLE1TABLE2 AS
SELECT TABLE1.FIELD1, TABLE2.FIELD2 FROM TABLE1 INNER JOIN TABLE2 ON TABLE1.JOININGFIELD = TABLE2.JOININGFIELD
If you have a situation when you want to show rows from several tables, then you again create a view, but this time using UNION (see dev.mysql.com/doc/refman/5.0/en/union.html ).
You can then dispay data specified by such view with TableJX.
Regards,
Bostjan
Please Log in or Create an account to join the conversation.