How do I write a query to join two tables

More
6 years 6 months ago #6756 by Kelechi Kalu
Hello,
I would like to create a Table Chart Type containing values from two different tables within an existing Database in my Joomla website. How can I write a query to join two tables?
See the attached screenshot showing two tables that I need to extract information to populate my Table Chart Type.
Kindly provide me a sample query.
Attachments:

Please Log in to join the conversation.

More
6 years 6 months ago #6758 by Daniel
Hello,
To write a query, you must have knowledge of MySql. The query would be like the following: select a.name, b.value from table1 as a join table2 as b on a.catid=b.id

Thanks
Daniel

Please Log in to join the conversation.

Cron Job Starts