Hi,
Here is the page, hopefully this will help to illustrate what I want to achieve. http://www.photocritter.net/forum/posts.php?mod=toppo&show_filter_tfi_ListrsImage6
The page displays photographs in order of their rating score. I want to filter the recordset with options from a drop down list in the date field. By default I want to filter the recordset to show only images submitted in the last week with options to filter by last month, last year and all.
The SQL
WHERE DATE_SUB(CURDATE(),INTERVAL 7 DAY) <= image_img.date_img
WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= image_img.date_img
WHERE DATE_SUB(CURDATE(),INTERVAL 365 DAY <= image_img.date_img
should be suitable for the job, in fact they return the correct results if I include one of them direclty in SQL statement to produce the Nextensio recorset, however I can't achieve the same results when using the statements in the filter pane or a drop down list? Can you not directly use SQL in a Nextensio filter? How can I use a drop down list in the date field to obtain the results required
Copy of the recorset
SELECT image_category.title_cat, message_msg.idusr_msg, message_msg.id_init_msg, message_msg.idimg_msg, message_msg.id_msg, message_msg.id_category_msg, image_img.rate_img, image_img.date_img, image_img.rate_tech_img, image_img.rate_orig_img, image_img.view_img, image_img.filename_img, image_img.title_img
FROM ((message_msg LEFT JOIN image_category ON image_category.id_cat=message_msg.id_category_msg) LEFT JOIN image_img ON image_img.id_img=message_msg.idimg_msg)
WHERE message_msg.id_msg=message_msg.id_init_msg AND {$NXTFilter_rsImages} AND {$NXTFilter_rsImages}
ORDER BY {$NXTSort_rsImages}
Thanks again
Stephen