So this is a bit weird as I've never had to deal with this issue before. I have a dataset with 4 basic joins to find the user who edited, created the record set.
SELECT `tasks`.`id`, `tasks`.`title`, `tasks`.`description`, `tasks`.`created_ts`, `tasks`.`modified_ts`,
assigned_user_id,
`u1`.`id` AS `assigned_to_id`,
`u1`.`firstname` AS `assigned_to_firstname`,
`u1`.`surname` AS `assigned_to_surname`,
`u2`.`id` AS `author_id`,
`u2`.`firstname` AS `author_firstname`,
`u2`.`surname` AS `author_surname`,
`u3`.`id` AS `modified_by_id`,
`u3`.`firstname` AS `modified_by_firstname`,
`u3`.`surname` AS `modified_by_surname`,
`t1`.`id`AS `priority_id`,
`t1`.`priority` AS `priority_priority`,
author_user_id,
modified_by_user_id,
type_priority_id
FROM tasks
LEFT OUTER JOIN `users` u1 ON `u1`.`id` = `tasks`.`assigned_user_id`
LEFT JOIN `users` u2 ON `u2`.`id` = `tasks`.`author_user_id`
LEFT JOIN `users` u3 ON `u3`.`id` = `tasks`.`modified_by_user_id`
LEFT JOIN `type_priority` t1 ON `tasks`.`type_priority_id` = `t1`.`id`
LIMIT 100
when I run this query, I only get the results with a particular user (ID:1). It just skips all other records that have joins with different users. What's funny is, when I don't select the fields from user tables (u1, u2 and u3), I get all the results that I expect.
ORDER BY
clause, so which 100 records do you expect back?...if you don't specify to the SQL engine, then you can essentially expect the results to be 100 random rows.