Bah. Het is inderdaad niet

Bah. Het is inderdaad niet zo simpel.

Ik kan geen cookie zetten als ik niet meer dan een beeld smijt naar de gebruiker blijkbaar. Of ik zou de headers allemaal zelf moeten gaan maken misschien.

Bon, voorlopig lukt het wel om sessions en clients weg te schrijven, maar dan wel door ze in de url-variabelen van het beeld mee te geven.

En dus kan ik nu weten hoeveel pagina’s de mensen in sites bekijken:

SELECT log_remotehost, log_useragent, COUNT(log_id) AS path
FROM  tblLog tblLog
WHERE log_sessionID IS NOT NULL
GROUP BY log_useragent, log_remotehost, log_sessionID
HAVING COUNT(log_id) > 1
ORDER BY path DESC, log_useragent, log_remotehost, log_sessionID DESC

Dat geeft voor één van onze sites op een paar minuten dit:














































































ncgent03.telenet-ops.be Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705) 14
MVUIJLST3 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; (R1 1.3); .NET CLR 1.1.4322) 9
218.14-200-80.adsl.skynet.be Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) 7
114.39-200-80.adsl.skynet.be Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0) 5
LBLANCQU1 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; (R1 1.3); .NET CLR 1.1.4322) 5
olympic1.axone.fr Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; Hotbar 4.2.8.0) 4
Candice-PP.cphs.wayne.edu Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt) 3
PROXY Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt) 3
dialin-246.dialin.unibas.ch Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt) 3
TPALKA.cphs.wayne.edu Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0) 3
node06ea.vpt.adsl.euronet.nl Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0) 3
www-cache1.unn.ac.uk Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) 3
cim-18.medicina.ufmg.br Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0) 3
khjivosa.vxu.se Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) 3
khjivosa.vxu.se Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) 3
pool-141-156-141-39.res.east.verizon.net Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.2.8.0; MSN 8.0; MSNbMSNI; MSNmen-us; MSNcIA) 3
ncgent03.telenet-ops.be Mozilla/4.0 (compatible; MSIE 5.5; Windows 98) 2
pion.ext.extranet.xerox.com Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; H010818) 2
ns1.prenhall.com Mozilla/5.0 (Macintosh; U; PPC; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 2

Dus niet helemaal sluitend: die khjivosa.vxu.se staat er twee keer in, en ikzelf (MVUIJLST3) ook twee keer. Grmbl.

2 reacties op “Bah. Het is inderdaad niet”

  1. Volgens mij is die group by onnodig, en als je die weglaat kun je er dan geen correlated subselect insteken die zoekt of eenzelfde log_remotehost bestaat? iets van:

    SELECT L1.log_remotehost, L1.log_useragent, COUNT(L1.log_id) AS path
    FROM tblLog L1,tblLog L2
    WHERE (L1.log_sessionID IS NOT NULL AND COUNT(L1.log_id) > 1)
    OR L1.log_remotehost IN
    ( SELECT DISTINCT L2.log_remotehost
    FROM tblLog)
    ORDER BY path DESC, log_useragent, log_remotehost, log_sessionID DESC

    Als ik uit mijn nek aan’t lullen ben, zegt u het maar 🙂

Reacties zijn gesloten.