|
| |
|
|
Stuart at Cherry
Posts: 121 From: Leeds, West Yorkshire, UK Status: offline
|
Bit harder query? - 4/5/2001 20:28:00
I'm 3/4 way through this new site. www.vbcontracts.com and I've got a query on the front page that lets you search jobs in a database. The form has two things to let you search on: Location - there is a drop down list of 14 UK geographical locations. There is also an 'all' location if you are that mobile that you can take a contract anywhere in the country. The SQL statement is currently this, and (thanks to Spooky!!) it works for geographical location search:SELECT * FROM "vacancy_list Query" WHERE Job_locator LIKE '::Job_locator::' However, there is a second search criteria in the same form which is meant to limit the search to jobs posted in the last 1,2,3,4 or 5 days. I've got an automatic date stamp in the DB as to when each job was added. Can anyone tell me how to amend the above code to include this part of the filter? At the moment it does nothing, of course, because that code is only picking up the 'job locator' part of the form. If it's any help, you can see the partially completed site at www.vbcontracts.com Thanks in advance... ------------------ ***born to be wild***
|
|
|
|
KeithG
Posts: 92 From: Irving TX Irving, Texas, USA Status: offline
|
RE: Bit harder query? - 4/6/2001 15:28:00
StuartI think the following should work for you, please note that I have made up field names for those that you did not list, you will need to replace them with your actual field names, ie. Date_Posted is you date stamp field in your database and '::Days::' is the name of the form field being sent by the form. SELECT * FROM "vacancy_list Query" WHERE Job_locator LIKE '::Job_locator::' AND (Date_Posted => Date()-'::Days::') I did this a little quickly but it should be close.... Keith
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|