SELECT `private_dialogs`.*, `users`.title, `private_messages`.text FROM `private_dialogs` LEFT JOIN `users` ON `private_dialogs`.to_id = `users`.user_id
LEFT JOIN `private_messages` ON `private_messages`.dialog_id = `private_dialogs`.dialog_id WHERE `private_dialogs`.`from_id` = :user_id GROUP BY `private_messages`.dialog_id