Forum Moderators: open
this is becoming over my head, and i dont know where to begin.
i have this query in a page on my server, that basically pulls a bunch of records for a specific week, and displays them later in the page.
HOW...can i use some sort of date selector to populate that date \'2007-10-22'\....
Say the user want to see records from a date of 3 weeks ago ....
i dont even know how to start researching this...
would that be a javascript?
im using php 5 for the actual page. thanks
$sql = 'SELECT COUNT(community) AS comm_count, (SELECT COUNT(*) FROM registration_table WHERE DATE_SUB(\'2007-10-22\',INTERVAL 7 DAY) <= lead_date AND community=\'RockHampton\') AS totalcount, (SELECT COUNT(last_visit) FROM registration_table WHERE DATE_SUB(\'2007-10-22\',INTERVAL 7 DAY) <= last_visit AND community=\'RockHampton\') AS last_visit FROM registration_table WHERE DATE_SUB(\'2007-10-22\',INTERVAL 7 DAY) <= entry_time AND community=\'RockHampton\'';