I'm then going to use the answers in my select statement to pull data from the database.
Heres what i have now:
sql= "select * from assistancerequest where datein >= Date() - 7"
heres the problem with it:
it gives no errors but when it shows my output it shows wrong data.
Example:
27/08/04
28/09/04
28/09/04
29/09/04
this is some of what i get. as you can see it counts back 7 days, but its not working because this is from two different months! so it looks like its only checking for the days and not the month. does any of this make sense?
Does anyone know a way to find out the numeric value of a day of the week for a specific week, I am trying to display week periods from Mon-Sun. Ive toyed around with is but can seem to come up with anything.
If ad_expiration_date (date() + 90) then ad_expiration_date = (date() + 90) else end if
What I want to happen is if the ad_expiration_date entered by the user is beyond 90 days from today's date, the Expiration Date should be today's date plus 90 days. If the entered date is less than 90 days from today's date, leave it as entered. The code isn't working correctly, all dates entered are getting converted to today's date plus 90 days.
I am developing a simple booking system where I had a booking date. The problem is I want to make sure that the user must book 3 days in advanced for certain room.
I have tried to use DateDiff but it seems doesn't work. Actually i just 1 to make sure that the user must book 3 days in advanced from the current date. I am wondering whether there is anything goes wrong in my datediff function. Code:
I was able to alternately change the rows colors, but this time lets say I have 10 records in a table taken from my database. How do i put colors on rows where value(certain value from a field) is lets say greater than 10? Like for example I want to highlight only those student number greater than 10.
Ok let me explain what I am trying to do as easily as I can. I have a table in my access database that I am connecting to. I select a specific id number using my SQL statement. Now what I am trying to do is scroll through that records row and get the column name of that column along with the value of that cell. I hope that isn't to confusing. Now I'm not sure whether this would be done using ASP or done in my SQL statement. Code:
I am working on a college project which has a user area and a page where only a user can access their information and no one elses.I am trying to do a select statment to read specific information from a field without reading any other users info. The code below is for a drop down menu for payment months i have stored in a database... Here is what i have got so far...
Code: Set oRs = Conn.Execute("SELECT [Payment_Period] FROM wages WHERE [Staff_ID]=" & staffid" ORDER BY [fullname]")
I am looking to find out how to grab a specific content on a particular Website and put it on my Website. Of course, I will get permissions before doing so. Any ideas? I have found a sample ASP script that shows how to grab the entire page, but certain sections of the page.
I need to execute different asp programs based on different values of a parameter. For example, if the user inputs ID of 1, program1 needs to be executed automatically, if user inputs ID=2, program2 needs to be executed in the background automatically. How do we do this in asp?
i want to check item before insert new item. let say resID = 1052. before that, i have inserted item which is prodNumber = 100 for resID = 1052. then, still at resID = 1052, i insert another item, prodNumber = 100.
then an error message will come out. but if i insert item, prodNumber = 100 but for resID = 1047, suppose there is no an error message.
that means the sql conditions are at current resID and prodNumber.
I have a feeling someone can answer this very quickly, but Im having problems. Basically Im trying to get the rate variable which will be either a 0 - 10 inserted into the appropriate row. I want the variable filename to match up with the matching filename in the database and then insert the rate variable into that filenames rate column. Hope I didnt confuse you to much.. Code:
im a bit of a rookie and i couldnt find anything using search,how can i have a statement which selects only the records which contain data. Code:
sSQL = "SELECT * FROM VIEW_COLLECTION " &_ "WHERE (BusinessID = 20) AND (Parentid = " & objRScats("CategoryID") & ") " &_"ORDER BY CollectionName"
Thats what i currently have. This is for the page navigation - and i dont want a those collections that do not have any data to be diaplyed - but i do not want to delete these records altogether just yet.
I can use the RIGHT function, but I'd like for it to work on any page, regardless of the length of the page name. I'm looking for a good example of using a combination of MID, LEFT, RIGHT, etc to get certain parts of strings.
I'm trying to read in a specific cell, and am having problems. I have a table of contact information, in which each contact has a user_id that defines where there information is.
At login it stores their user_id into a temp variable that is used to define where to find the information for each contact. I can read in contact information for the first row but anything below that I cant seem to grasp.
Im not sure how to tell it to match that temp variable with their user_id and read in the user_name. the temp variable is user_ID. Code:
I have a few ASP pages that go out and query a database and return data that meets a requirement. For example I have Department hyperlinks in a Nav bar that select just the records associated with that department. The returned records are placed in a table to be viewed. In that table I have a field hypelinked to a PDF image. 100+ records could be returned.
How could I place a hyperlink, or check box, in one of the fields that would select that specific record and display the data on another ASP Page. What I am trying to get at is when I get the returned set of records, being able to click ONE of them and display that information as well as any associated images connected to that single record.
i have a remove user and change password script written, but the only thing they are missing is the actual text file editing part. i have the file open because i have read it, but how can i delete a line that matches with 'OldLine' and put 'NewLine' where it was with a couple of lines of code?
I would like to collect financial data from the stock exchange into the asp web page. Complete daily results are in txt format on a fixed URL. Soo far I managed to pull the data on my web page, but now would like to select only specific rows. Unfortunatly the rows are not fixed, but each one has a 4 digit code on the beggining.
So I would like to create asp code which would select n rows from txt page based on specific code on the beginning - for example 0020. In the SQL would look like this one SELECT * FROM file.txt WHERE the beggining of the row = 0020
I have made a secure website which you can only get access to with right username and password. On this webpage I have some links to some pdf-files, but how can I avoid people from getting the file if they are not logged on first? As it is now they can easily get the file if they just know the exact URL-address, ex:
www.website.com/dir/file1.pdf
If people type the URL above I would like them to be redirected to the logon-page first. I can't use components or MS-Access database, so I'm looking for another solution.
Is there any way to disable certain functions in the browser when someone is looking at certain pages on your site which would disable the user from being able to print, view source and save? I learned the no right click trick here earlier, but users can still click file print or save or source.
I want to know is it possible to upload file into specific directory? Actually I already find how to upload a file, but I can not choose/browse where I want to store/save the file.
Is there any way by using ASP with MS access to retrieve a specific data from a table and when i retrieve i want to show me the data without repeating the same data or duplicating data and i want instead of this to count for each item how many row is there in a the table ....... loooool i know that most of you will tell me to re-explain what i want to say again ... ? For example i had three rows in the table ... and those rows are the same with 4 attributes ... what i need is to retrieve those rows in the website .. but instead of showing three rows it will show me one and next to this row i want to put 3 which is the number of the rows in the table that are the same and if i have any other rows it will do the same ...
My web application uses a custom-generated menu system which is tailored for each user individually when they log in, based on their permissions. I've got this working very quickly on the server using ASP, and the menus are just included into each page as it's served out.
The problem is that the menus take up a fair amount of bandwidth (about 12 seconds over 28.8 modem - not an uncommon dial-up speed in this part of the world). I can't really simplify the menus any further, so the only thing left to me is to somehow cache the menus on the client, but I can't figure out a way to do it.I've thought about getting the asp menu builder program to write out the menu item data to a .js script file and then build the menus on the client using the cached .js file, but this is clumsy, and if the user's machine is low-spec it could take longer to build the menus than download them.