Adding fields to a complex SQL select statement

I need to return the values of two more fields from the "sys_acl_matrix" table, but I don't know how to read these AS and LEFT JOIN things.The fields I need to add are:\[code\]AllowedCountAllowedPeriodLen\[/code\]Here is the Query\[code\]$GLOBALS['MySQL']->getAllWithKey("SELECT `ta`.`ID` AS `id`, `ta`.`Name`AS `title` FROM `sys_acl_actions` AS `ta` LEFT JOIN `sys_acl_matrix` AS `tm` ON `ta`.`ID`=`tm`.`IDAction` LEFT JOIN `sys_acl_levels` AS `tl` ON `tm`.`IDLevel`=`tl`.`ID` WHERE `tl`.`ID`='" . $iMembId . "' ORDER BY `ta`.`Name`", "id");\[/code\]It would also be good if someone could help me understand what this query is doing. I'm lost when it comes to left joins.
 
Back
Top