Click or drag to resize
EditorLeftJoin Method
Add a left join condition to the Editor instance, allowing it to operate over multiple tables. Multiple
leftJoin()
calls can be made for a single Editor instance to join multiple tables. A left join is the most common type of join that is used with Editor so this method is provided to make its use very easy to configure. Its parameters are basically the same as writing an SQL left join statement, but in this case Editor will handle the create, update and remove requirements of the join for you: * Create - On create Editor will insert the data into the primary table and then into the joined tables - selecting the required data for each table. * Edit - On edit Editor will update the main table, and then either update the existing rows in the joined table that match the join and edit conditions, or insert a new row into the joined table if required. * Remove - On delete Editor will remove the main row and then loop over each of the joined tables and remove the joined data matching the join link from the main table. Please note that when using join tables, Editor requires that you fully qualify each field with the field's table name. SQL can result table names for ambiguous field names, but for Editor to provide its full CRUD options, the table name must also be given. For example the field
first_name
in the table
users
would be given as
users.first_name
.

Namespace:  DataTables
Assembly:  DataTables (in DataTables.dll) Version: 1.6.5.0 (1.6.5.0)
Syntax
C#
public Editor LeftJoin(
	string table,
	string field1,
	string op,
	string field2
)

Parameters

table
Type: SystemString
Table name to do a join onto
field1
Type: SystemString
Field from the parent table to use as the join link
op
Type: SystemString
Join condition (`=`, '<`, etc)
field2
Type: SystemString
Field from the child table to use as the join link

Return Value

Type: Editor
Self for chaining
See Also