I have the following sql
$result = $db->sql_query("SELECT DISTINCT (
topic_id), `post_id` , `topic_id` , `forum_id` , `poster_id` , `icon_id` , `poster_ip` , `post_time` , `post_approved` ,
`post_reported` , `enable_bbcode` , `enable_smilies` , `enable_magic_url` , `enable_sig` , `post_username` , `post_subject` ,
`post_text` , `post_checksum` , `post_attachment` , `bbcode_bitfield` , `bbcode_uid` , `post_postcount` , `post_edit_time` ,
`post_edit_reason` , `post_edit_user` , `post_edit_count` , `post_edit_locked`
FROM ".$table_prefix."posts WHERE forum_id='".$forumid."'
GROUP BY topic_id
ORDER BY `phpbb_posts`.`post_time` DESC
LIMIT 10");
I'd like to change it so it only picks up this months. If the post_time field were in date format it'd be easy, but i'm unsure how to do it with this
The post time is int and data is stores like 1251658625 which is converted in the script to 30 Aug 2009 18:57