Skip to main content

Design Complex Joins from GUI

Use JCBโ€™s visual query builder to create advanced SQL joins across multiple database tables โ€” without writing a single line of SQL

What It Does
The Dynamic GET Builder in Joomla Component Builder allows you to visually build complex queries involving one or more tables. You define the primary table and visually โ€œjoinโ€ related tables, selecting the fields you need from each and specifying how they relate. JCB then auto-generates secure, Joomla-compliant model code and query statements.

Key Capabilities

  • ๐Ÿ”— Join multiple related tables (one-to-one, one-to-many, many-to-many)
  • ๐Ÿ”ง Choose join types (LEFT, RIGHT, INNER) from the GUI
  • ๐Ÿ” Select specific fields to include from each joined table
  • ๐Ÿง  Define join conditions using foreign keys or custom expressions
  • ๐Ÿ“Š Auto-generates Joomla Query API calls (not raw SQL)

Where to Configure

Inside the Dynamic GET Builder:

  • Start with a primary table (e.g., #__yourcomponent_main)
  • Add related tables using the โ€œJoin Tableโ€ feature
  • Set join rules (ON conditions) using dropdowns or field matchers
  • Select output fields from any joined table
  • Optionally: add WHERE, GROUP BY, ORDER BY clauses

Example Scenarios

  • Join #__orders with #__users to show customer names with each order
  • Combine #__articles with #__categories for a filtered blog list
  • Create dashboards showing data across multiple business entities
  • Merge custom tables (e.g., invoices, transactions, audit logs)

Use Cases

  • โœ… Build frontend lists showing user-generated content
  • โœ… Power custom admin dashboards with real-time metrics
  • โœ… Drive views requiring cross-referenced data from many tables
  • โœ… Construct API-style outputs for JSON or XML rendering

Benefits

  • โœ… No SQL knowledge needed โ€” everything visual
  • โœ… Reusable: one Dynamic GET can be attached to multiple views
  • โœ… Round-trip safe: stored and compiled automatically
  • โœ… Git versionable: stored as JCB entities and shared like code

Conclusion

With JCBโ€™s visual join interface, you can handle data relationships that typically require custom SQL models โ€” visually, safely, and flexibly. Itโ€™s an ideal way to future-proof complex views while staying within Joomla best practices.