I have this. \"Detail all films shown by the club between any two given dates, inputted by the user. For example a club member must be able to input a start date and an end
Here's the code for a stored procedure:
CREATE PROCEDURE SomeName(@UserStart DATETIME, @UserEnd DATETIME)
AS BEGIN
SELECT somestuff
FROM sometable
WHERE somedate BETWEEN @UserStart AND @UserEnd
END
@Kyle93 - Looking at your WHERE Clause:
WHERE sdate = '&userstart' AND fdate = '&userend'
This will only get you Films that had a sdate(Start Date?) equal to the date value entered. You might want to use Greater than, Less Than operators....
Such as:
WHERE sdate <= '&userend' AND fdate >= '&userstart'
(Note comparing sdate to UserEnd Date to make sure Film Showing started EARLIER than the UserEnd Date...etc)
This way - when a show starts OR ends within the date range - it will be selected.
Are you familiar at all with LINQ? It's a way to make db calls from c#.
-- I would handle this with HTML as you thought, and use Javascript/Ajax to reference c# code that uses LINQ for db calls. Might be a bit complicated however, if you're not familiar with much of that. I can recommend good tutorials if interested tho.