ok...getting too messy down there...

Results 1 to 2 of 2

Thread: ok...getting too messy down there...

  1. #1
    Join Date
    Dec 1969

    Default ok...getting too messy down there...

    this is what i got...going to go just with the time right now...should work for just 10 ips..<BR><BR>i am having a problem printing them out to the page though...not familar with arrays yet..and i think that is the ticket<BR><BR>here is my code<BR>------------------<BR> Dim objRecordset<BR> Set objRecordset = Server.CreateObject("ADODB.Recordset")<BR> <BR> strSQL = "SELECT TOP 10 IP FROM tblIP ORDER BY date;"<BR><BR> objRecordset.Open strSQL, DB_CONNECTIONSTRING<BR><BR><BR> objRecordset.Close<BR> Set objRecordset = Nothing

  2. #2
    Join Date
    Dec 1969

    Default Messy or not...stay with one thread

    We&#039;ve had threads with 50 to 70 messages in them before. No reason not to do so again.<BR><BR>No, you can&#039;t do <BR> ORDER BY date<BR>for several reasons:<BR><BR>(1) If date is a field in your table, then you have to put [...] around it. <BR>(2) If you do ORDER BY someDateField, then you will get the 10 *earliest* hits, not the 10 latest. You need to use DESC after the field name.<BR>(3) If date is *NOT* a field in your table, then although the query will work, it accomplishes nothing. Because the date keyword in SQL means simply "today&#039;s date" and so *all* the records will have the same date value.<BR><BR>YOU MUST CHANGE YOUR TABLE to add another field to it.<BR><BR>Now go back to my "on the nose" post and continue from there.<BR><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