problem in mysql query with join and limit the time
Posted
by moustafa
on Stack Overflow
See other posts from Stack Overflow
or by moustafa
Published on 2010-03-17T18:14:09Z
Indexed on
2010/03/17
18:21 UTC
Read the original article
Hit count: 248
mysql
i have this
SELECT COUNT(1) cnt, a.auther_id
FROM `posts` a
LEFT JOIN users u ON a.auther_id = u.id
GROUP BY a.auther_id
ORDER BY cnt DESC
LIMIT 20
its work fine bu now i want select from posts which added from 1 day tried to use
WHERE from_unixtime(post_time) >= SUBDATE(NOW(),1)
but its didnot worked any one have idea
© Stack Overflow or respective owner