MySQLi Query Builder

Advanced SQL statements for use in recordsets can be created visually and easily in the Query Builder interface. Query Builder consists of 3 parts: The workspace, where tables can be dragged and dropped for inclusion into the SQL statement and JOINs can be made, the SQL Statement tab, where you can see your full SQL statement as you create it, and the Advanced Builder tab, where more advanced SQL can be crafted by simply clicking on options.

Query Builder can be accessed by clicking the Query Builder button in the Advanced Recordset user interface.

Query Builder Workspace

Relationships in the Query Builder interface can be defined by doing the following in the graphical workspace:

  1. Drag tables that you want to form relationships with into the work space.
  2. To create a JOIN, mouse to the right of a table column until a single arrow appears. Then click and drag to the left of the table and column you wish to join to.
  3. Changes can be made to the Join Properties Overly by clicking and toggling between 1 and 0.
  4. To save space, tables can be minimized by clicking the collapse and expand buttons to the right of the table name.
  5. Tables can be removed from your model by clicking the Trash Can icon.

Changes made in the workspace will update your SQLon the fly and can be viewed in the SQL Statement tab.

SQL Statement Tab

Your SQL is viewable in the SQL Statement tab and will update as changes are made in the workspace and within the Advanced Builder tab. Edits directly to the SQL statement can also be performed and the workspace and Advanced Builder tab will update accordingly so long as the SQL entered is valid.

Advanced Builder Tab

The Advanced Builder tab is where more advanced SQL can be crafted in a clickable and easy to use fashion. After adding tables and creating relationships in the workspace, advanced options will appear for further customization.

Options in gray (or 'grey' for our friends over the pond), are options that can be modified. Depending on what type of option it is, a select list, field or a dynamic data button may appear requesting further input. Otherwise, an option may simply toggle.

Clicking OK will close the Query Builder interface and your SQL statement will now be entered in the SQL box of the Advanced Recordset interface.

**Note: Due to limitations in older versions of Dreamweaver, Query Builder is only available in Dreamweaver CS6 and later.