Re: Help with Date

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Bob Barrows [MVP] (reb01501_at_NOyahoo.SPAMcom)
Date: 04/22/04


Date: Thu, 22 Apr 2004 14:49:37 -0400

Ben wrote:
> Im writing a script that will get the last 7 days of information, more
> specifically the points within those 7 days. What I have works some of
> the time, but it doesn't work all of the time, if a user hasn't
> entered anything for 7 days it crashes, thanks for any help.
> ------------------------------------------------------------------
> i = 0
> x = 7
> 'Create an ADO recordset object
> Set rs_rufitPoints = Server.CreateObject("ADODB.Recordset")
>
> 'Initialise the strSQL variable with an SQL statement to query the
> database
> strSQL = "SELECT points, actDate FROM tblActivity WHERE USER_ID = "&
> ret_ID &" ORDER BY actdate DESC"

:-)
This is silly. If you want the last 7 days, then retrieve the last 7 days.
What database are you using?

Bob Barrows

-- 
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


Relevant Pages

  • Get IP Address and MAC Address via script
    ... I am currently writing a domain migration script to join workstations ... Two of the columns in the database are for IP Address and ... multiple adapters with an IP Address or a single adapter with multiple ...
    (microsoft.public.scripting.vbscript)
  • Re: Decoding the query string array
    ... First off - you ought to becareful writing $_POST data to the database ... I'm new to MySQL but I have written a script that takes my HTML field/box ...
    (comp.lang.php)
  • Re: Unable to update SQL db
    ... You've just told me your sql statement was referencing an invalid ... Here is the isql command I am trying to model my script after.. ... create_block in a database called TEST_SERVERS. ... Please reply to the newsgroup. ...
    (microsoft.public.scripting.vbscript)
  • Re: eval() or call_user_func() ???
    ... script (not a string). ... I am writing a simplified 'clone' of crontab, ... tasks - the tasks vbeing stored in a database table - I'm not ...
    (comp.lang.php)
  • Re: Checking if database exists on another server
    ... > I'm writing a little script and I would like to find out if a certain ... > database exists on a specific server. ... executable and -h checks to see if it is a symbolic link, ...
    (comp.unix.shell)