| << Older Posts in Coding |
| posted at 02:38:10 By Flipping Heck! | Posted In Coding |
| posted at 10:20:07 By Flipping Heck! | Posted In Coding |


| posted at 16:39:10 By Flipping Heck! | Posted In Coding |
| posted at 14:59:30 By Flipping Heck! | Posted In Coding |
| posted at 13:58:19 By Flipping Heck! | Posted In Coding |
It's taken me ages to find out how to do this (what turns out to be a) relatively simple operation.
Here's the problem. Table 1 has a user_id which is auto incremented by MYSQL. Table 2 has an auto incremented login_id but also requires the user_id. Here's how we get one ID from one table to the other:
objRS.source = "Select LAST_INSERT_ID() from Table1"
objRS.open
LastID = objRS("LAST_INSERT_ID()")
objRS.Close
Simple! We can then refer to the LastID in Table 2
| posted at 15:18:52 By Flipping Heck! | Posted In Coding |
I've been writing an application for work that requires me to display one weeks worth of data, starting on a Monday and ending on a Sunday. Below is the code that will find the first Monday and subsequent days dates.
This code would be useful for a calendar system, time-tracking application, project management etc.
<%
'** Get Today's Date
CurrentDate=FormatDateTime(Now,2)
'** Get Which day of the week it is (number)
FirstDayOfTheWeek=Weekday(CurrentDate, 2)
'** Find how many days until Sunday are left
LastDayOfTheWeek=7-FirstDayOfTheWeek
'** Beginning of the week (Monday) Date
FindMonday=DateAdd("d",-FirstDayOfTheWeek, CurrentDate)+1
'** End of the Week (Sunday) Date
FindSunday=DateAdd("d", LastDayOfTheWeek, CurrentDate)
'** Work out the dates for various days
Monday=FindMonday
Tuesday=DateAdd("d", FindMonday, 1)
Wednesday=DateAdd("d", FindMonday, 2)
Thursday=DateAdd("d", FindMonday, 3)
Friday=DateAdd("d", FindMonday, 4)
Saturday=DateAdd("d", FindMonday, 5)
....
| posted at 13:29:20 By Flipping Heck! | Posted In Coding |
The World Wide Web Consortium has launched their own RSS/Atom Feed validator. It can be found at http://validator.w3.org/feed/ so now excuses for bad feed!
Although I have to say 'though mine works it doesn't validate properly... hmmm 
| << Older Posts in Coding |





View the Tag Cloud or View the Category Cloud