Skip to content

Left / Inner Join with multiple #636

Answered by Llewellynvdm
marcorensch asked this question in Q&A
Discussion options

You must be logged in to vote

The best way I have with consistent correct linking via sql been able to resolve this is to give that field that stores the json, its own table. So I create a table via the component MySQL tab, and if the component is already sipped to clients I also use the MySQL update area to also create this table. Then in my front-end query I link the data directly via sql.

The sql could look like this:

CREATE TABLE IF NOT EXISTS `#__[[[component]]]_relationships` (
	`area` TINYINT(3) NOT NULL,
	`id` INT(11) NOT NULL COMMENT 'Area item ID',
	`member` INT(11) NOT NULL,
	`type` INT(11) NOT NULL,
	`active` INT(11) NOT NULL DEFAULT 0,
	PRIMARY KEY (`area`, `id`, `member`, `type`)
) ENGINE=InnoDB DEFAULT …

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Llewellynvdm
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants