whats wrong with the following sql? i have no idea at all
SELECT `posts`.*
FROM `posts`
WHERE ((`posts`.`featured` = 1 OR `posts`.`author_id` = 5))
ORDER BY (ln( 1 + posts.likes_count) +
(EXTRACT(EPOCH FROM posts.created_at) -
1327654606)/9000) desc LIMIT 15
thanks
EPOCHis not valid in MySQL. Try replacingwith
to get the seconds of
posts.created_atsince1970-01-01 00:00:00.See MySQL UNIX_TIMESTAMP