Кредитор™ (12 сен 2013 21:36)
|
|
Saint, угу. я тогда вот такой запрос насобирал: $query = "SELECT gallery_foto.id, gallery_foto.okk, gallery_foto.positive, gallery_foto.negative, gallery_foto.id_gallery, gallery_foto.name, gallery_foto.ras, gallery_foto.type, gallery_foto.ld_time, ((gallery_foto.positive + 1.920 / (gallery_foto.positive + gallery_foto.negative) - 1.96 * SQRT((gallery_foto.positive * gallery_foto.negative) / (gallery_foto.positive + gallery_foto.negative) + 0.9604) / (gallery_foto.positive + gallery_foto.negative)) / (1 + 3.8416 / (gallery_foto.positive + gallery_foto.negative)) AS ci_lower_bound, gallery.id_user, gallery.id AS gallery, user.nick, user.pol, user.id AS iduser FROM gallery_foto, gallery, user WHERE gallery_foto.positive + gallery_foto.negative > 0 AND gallery.id = gallery_foto.id_gallery AND gallery_foto.okk <> '0' AND user.id = gallery.id_user ".$pol." ORDER BY ci_lower_bound DESC LIMIT ".$start.", 5"; // рейтинг фотографий по формуле из фильма про фейсбук |