Tottally stumped -- try to figure this one out!

Results 1 to 3 of 3

Thread: Tottally stumped -- try to figure this one out!

  1. #1
    Rob Speicher Guest

    Default Tottally stumped -- try to figure this one out!

    Ok, here&#039s the setup:<BR><BR>Writing a news script. It&#039s customized for the design at http://www.kalinexus.net/index2.html (see the news area for what I&#039m trying to explain).<BR><BR>A staff member goes to post.asp and enters the Headline, chooses their name from a drop-down list, enters the password, chooses the post background (because the background for posts must alternate), and enters the story. When they hit submit, the information from the form is sent to addnews.asp, which processes the password, author&#039s e-mail etc. and posts it to a database...all of this currently WORKS as planned.<BR><BR>The problem I&#039m having is this. If the day in which the post was made is different from the previous post, it should ADD 6 lines to the news...those 6 lines being<BR><BR>---------------------<BR>&#060;td BACKGROUND="http://www.kalinexus.net/images/main/main03_header85_large.gif" HEIGHT="17"&#062;&nbsp;<BR>&#060;span CLASS="headlines"&#062; & ModDate & &#060;/span&#062;&#060;/td&#062;<BR>&#060;/tr&#062;<BR>&#060;tr&#062;<BR>&#060;td&#062;&#060; img SRC="http://www.kalinexus.net/images/main02_2pxdot.gif" WIDTH="2"" HEIGHT="2""&#062;&#060;/td&#062;<BR>&#060;/tr&#062;<BR>---------------------<BR><BR>BUT, if the post was made the SAME day as the previous post (that already contains the above 6 lines), the new post should be added below the one with those 6 lines already contained in them.<BR><BR>This is creating a problem because the database entries are sorted by the AutoNumber given to each post automatically, so rs.MoveNext rs.AddNew &#060;entries&#062; has no effect. Is there a way to not sort at all?<BR><BR>You really do have to look at the news page to understand the layout and what I&#039m trying to accomplish. Does anyone have ANY ideas how this can be accomplished? I&#039m totally stumped, and I&#039ve tried a few things. Thanks.

  2. #2
    Rob Guest

    Default RE: Tottally stumped -- try to figure this one out!

    I didn&#039t get to look at the site, but I do have an idea of what your trying to accomplish. <BR><BR>Assuming that your storing the dates of each posting, you can use the the datediff vbscript function to determine if the current date - which can be generated with<BR>strDate = date()

  3. #3
    Rob Guest

    Default RE: Tottally stumped -- try to figure this one out!

    I didn&#039t get to look at the site, but I do have an idea of what your trying to accomplish. <BR><BR>Assuming that your storing the dates of each posting, you can use the the datediff vbscript function to determine if the current date - which can be generated with<BR> strDate = date()<BR>is the same. If datediff(strDate, postingDate) &#062; 0 then post one chunk of HTML, else post the other...<BR><BR>Hope this helps..<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •