mysql_query("SELECT * FROM `notifications` INNER JOIN `users` ON users.vk_id = notifications.from WHERE notifications.to = '$user_vk_id' OR notifications.from = '$user_vk_id'");
I still need to create ON users.vk_id = notifications.to. Like that:
ON users.vk_id = notifications.from ON users.vk_id = notifications.to
But how to write, I do not catch up.