1 | QUERY: SELECT `videos`.*, `users`.`username`, `users`.`avatar`, `users`.`firstname`, `users`.`lastname`, `users`.`email`, (SELECT COUNT(1) FROM `comments` WHERE `video_id` = `videos`.`record_num`) AS `comments_nb`, (SELECT (`points`/`votes_nb`) FROM `videos_ratings` WHERE ~`videos_ratings`.`video_id` = `videos`.`record_num`) AS `rating`, (IF(`videos`.`user_id` =, 1, IF(`videos`.`user_id` = , 1, IF(`privacy` = 0, 0, IF(`privacy` = 1, 1, IF(`privacy` = 2, (SELECT COUNT(*) FROM `users_friends` WHERE `user_id` = '' AND `friend_id` = `videos`.`user_id` AND `approved` = 1), IF(`privacy` = 3, IF((SELECT COUNT(*) FROM `users_friends` `f1` WHERE `f1`.`user_id` = `videos`.`user_id` AND `f1`.`approved` = 1 AND `f1`.`friend_id` IN (SELECT `f2`.`friend_id` FROM `users_friends` `f2` WHERE `f2`.`user_id` = '' AND `f2`.`approved` = 1)) > 0, 1, (SELECT COUNT(*) FROM `users_friends` WHERE `users_friends`.`user_id` = '' AND `users_friends`.`friend_id` = `videos`.`user_id` AND `approved` = 1)), (SELECT COUNT(*) FROM `users_relationships` WHERE `user_related_id` = '' AND `user_id` = `videos`.`user_id` AND `type` = 'family')))))))) AS `privacy_available` FROM `videos` INNER JOIN `users` ON `videos`.`user_id` = `users`.`record_num` WHERE `videos`.`record_num` = '71' AND `videos`.`enabled` = 1 AND `videos`.`deleted` = 0 AND `videos`.`processed` = 1 HAVING `privacy_available` = 1
#0 /home/tp/domains/twojaparafia.pl/public_html/controllers/control.video.php(12): dbQuery('SELECT `videos`...', false)
#1 /home/tp/domains/twojaparafia.pl/public_html/index.php(26): include('/home/tp/domain...')
#2 {main}