Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

having some trouble...........

here is what i want to appear on the screen

10/19/2005
2004 Nissan Maxima
2003 Dodge Grand Caravan
10/18/2005
2002 Buick Park Avenue
1997 Honda Accord
10/16/2005
2004 Ford F-150
10/15/2005
1990 Oldsmobile Starfire
-----------------------------------
here is what currently appears

10/19/2005
2004 Nissan Maxima
10/19/2005
2003 Dodge Grand Caravan
10/18/2005
2002 Buick Park Avenue
10/18/2005
1997 Honda Accord
10/16/2005
2004 Ford F-150
10/15/2005
1990 Oldsmobile Starfire
--------------------------------------------------------

----------------------------------------------------------
here is the relevant code
-------------------------------------------------------
[code]

<%
dim objConn
DBConnOpen objConn

dim ObjRS

dim CarSQL
dim ShowResults

ShowResults = False



CarSQL = "Select a.Year, a.Make,a.Model, a.date from North_Yard a where a.Date >= getDate() - 7 order by a.Date DESC"

set ObjRS=Server.CreateObject("ADODB.recordset")
ObjRS.Open CarSQL, objConn


ShowResults = True
<%do until ObjRS.eof%>

<%=ObjRS("Date")%>







">
<%=ObjRS("Year")%>
<%=ObjRS("Make")%>
<%=ObjRS("Model")%>


<%ObjRS.MoveNext%>
<%loop%>
[/code]




-----------------------------------------------------------------------
ANY SUGGESTIONS ?

Comments

  • weirdmixweirdmix Member Posts: 27
    : here is what i want to appear on the screen
    :
    : 10/19/2005
    : 2004 Nissan Maxima
    : 2003 Dodge Grand Caravan
    : 10/18/2005
    : 2002 Buick Park Avenue
    : 1997 Honda Accord
    : 10/16/2005
    : 2004 Ford F-150
    : 10/15/2005
    : 1990 Oldsmobile Starfire
    : -----------------------------------
    : here is what currently appears
    :
    : 10/19/2005
    : 2004 Nissan Maxima
    : 10/19/2005
    : 2003 Dodge Grand Caravan
    : 10/18/2005
    : 2002 Buick Park Avenue
    : 10/18/2005
    : 1997 Honda Accord
    : 10/16/2005
    : 2004 Ford F-150
    : 10/15/2005
    : 1990 Oldsmobile Starfire
    : --------------------------------------------------------
    :
    : ----------------------------------------------------------
    : here is the relevant code
    : -------------------------------------------------------
    : [code]
    :
    : <%
    : dim objConn
    : DBConnOpen objConn
    :
    : dim ObjRS
    :
    : dim CarSQL
    : dim ShowResults
    :
    : ShowResults = False
    :
    :
    :
    : CarSQL = "Select a.Year, a.Make,a.Model, a.date from North_Yard a where a.Date >= getDate() - 7 order by a.Date DESC"
    :
    : set ObjRS=Server.CreateObject("ADODB.recordset")
    : ObjRS.Open CarSQL, objConn
    :
    :
    : ShowResults = True
    : <%do until ObjRS.eof%>
    :
    : <%=ObjRS("Date")%>
    :
    :
    :
    :
    :
    :
    :
    : ">
    : <%=ObjRS("Year")%>
    : <%=ObjRS("Make")%>
    : <%=ObjRS("Model")%>
    :
    :
    : <%ObjRS.MoveNext%>
    : <%loop%>
    : [/code]
    :
    :
    :
    :
    : -----------------------------------------------------------------------
    : ANY SUGGESTIONS ?
    :

    you should use 2 variables, one for the current "date" and one for the last painted "date". now, before you paint the current date, you should check if is equals the last painted date, got it?
    like this:
    <%
    'initialize vars before loop
    currentDate=""
    lastPaintedDate=""

    do until ObjRS.eof
    currentDate==ObjRS("Date")
    if cdate(currentDate)<> cdate(lastPaintedDate) then
    %>
    :
    : <%=currenDate%>
    :
    :
    <%end if%>
    :
    :
    :
    :
    : ">
    : <%=ObjRS("Year")%>
    : <%=ObjRS("Make")%>
    : <%=ObjRS("Model")%>
    :
    :
    : <%ObjRS.MoveNext%>
    : <%
    lastPaintedDate=currentDate
    loop%>

    hope helps..
Sign In or Register to comment.