navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Bit harder query?

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Bit harder query?
Page: [1]
 
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   
Stuart

I 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


(in reply to Stuart at Cherry)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Bit harder query?
Page: [1]
Jump to: 1





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