$q = "
SELECT wall.id, wall.owner_id, wall.user_id, wall.text, wall.active, wall.date, wall_photos.photo, wall_audios.audio
FROM wall
LEFT JOIN wall_photos
ON wall.id = wall_photos.wall
AND wall_photos.active = 1
LEFT JOIN wall_audios
ON wall.id = wall_audios.wall
AND wall_audios.active = 1
WHERE owner_id = ?
AND wall.active = 1
ORDER BY wall.date DESC";
$wall = $db->rawQuery($q, [$owner_id]);
SELECT
wall.id,
wall.owner_id,
wall.user_id,
wall.text,
wall.active,
wall.date,
GROUP_CONCAT(DISTINCT(wall_photos.photo)),
GROUP_CONCAT(DISTINCT(wall_audios.audio))
FROM wall
LEFT JOIN wall_photos
ON wall.id = wall_photos.wall
AND wall_photos.active = 1
LEFT JOIN wall_audios
ON wall.id = wall_audios.wall
AND wall_audios.active = 1
WHERE owner_id = ?
AND wall.active = 1
GROUP BY wall.id
ORDER BY wall.date DESC
Хотите получить все фото и видео на стене - делайте три запроса: к wall, wall_photos и wall_audios отдельно