Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
confuzzed
Starting Member
2 Posts |
Posted - 2005-04-16 : 04:00:19
|
Not sure where this fits in the forums, so move if needed.basically I am building a calendar that displays dates that are not available. the dates are stored in a MySql database. the recordset tests fine. I need to be able to display an icon on the calendar (on the date) if the date has been booked. (for simplicity I have 'not avail' displayed below)if my code was working I wouldnt be here so......********************************************************************CODE START 'if the date is booked then insert the booked icon If Not Recordset1.BOF Then '--Move to the first record Recordset1.MoveFirst Do Until Recordset1.EOF '--If the year matches, then continue to check the month and day-- If Recordset1.Fields("year")= Year(dDate) Then If Recordset1.Fields("month") = Month(dDate) Then If Recordset1.Fields("day") = Month(dDate) Then '--If everything matches the current day, then display icon Response.Write("Not Avail") End If End If End If '--If nothing matches, move to the next record and 'start over again-- Recordset1.MoveNext LoopEnd If****************************************************CODE ENDi do not receive any errors, nothing. The calendar "ignores" the code. any ideas would be appreciated....thanks (ASP ABS) |
|
confuzzed
Starting Member
2 Posts |
Posted - 2005-04-16 : 04:04:32
|
4am blunder If Recordset1.Fields("yeararr")= Year(dDate) Then If Recordset1.Fields("montharr") = Month(dDate) Then If Recordset1.Fields("dayarr") = Day(dDate) Thenfor those of you that caught the day/month error... |
|
|
|
|
|