Current User: Guest Login
Please consider registering


Lost Your Password?

Search Forums:


 






Minimum search word length is 4 characters – Maximum search word length is 84 characters
Wildcard Usage:
*  matches any number of characters    %  matches exactly one character

Multiple parameter

Reply to Post Add a New Topic
UserPost

11:25 pm
October 5, 2008


VincentSylar

Guest

Hi,

I have query string like this

/additem.asp?product_id=102,103,104

but awstat list that as single entry . How to list & count the product_id as separate value?

Thanks.

1:15 am
October 6, 2008


Jean-Luc

Admin

posts 1125

This can be set in your AWStats config file. The defaut value is:

URLWithQuery=0

Replace it with:

URLWithQuery=1

1:40 am
October 6, 2008


VincentSylar

Guest

I have set that value and here's my Extrasection config.

ExtraSectionName1=”District”
ExtraSectionCodeFilter1=”200 304″
ExtraSectionCondition1=”URL,\\/shop\\/sr1\\.
htm”
ExtraSectionFirstColumnTitle1=”District”
ExtraSectionFirstColumnValues1=”QUERY_STR
ING,district_id=([^&]+)”
ExtraSectionFirstColumnFormat1=”%s”
ExtraSectionStatTypes1=PHB
ExtraSectionAddAverageRow1=0
ExtraSectionAddSumRow1=1
MaxNbOfExtra1=1000
#MinHitExtra1=1

for the URL /shop/sr1.htm?district_id=102,103

awstat list and count 102,103 as one entry

can it list and count it as two entries?

102

103

1:51 am
October 6, 2008


VincentSylar

Guest

the URL should be /shop/sr1.htm?district_id=102&district_id=103

2:05 am
October 6, 2008


Jean-Luc

Admin

posts 1125

An extra section counts hits. When there is a hit on /shop/sr1.htm?district_id=102,103  or on /shop/sr1.htm?district_id=102&district_id=103 , it can only be counted as 1 hit.

Another approach would be to create an extra section that counts the hits on URL's including "102" and another that separately counts the hits on URL's including "103".

2:45 am
October 6, 2008


VincentSylar

Guest

ic. Then can I only match the first result.

e.g. only match the first district_id in query string.

3:25 am
October 6, 2008


Jean-Luc

Admin

posts 1125

If there is no other parameter before the first “district-id”, you can try this :

ExtraSectionFirstColumnValues1="QUERY_STR
ING,^district_id=([^&]+)"

(^ character added in front of “district_id”)

3:43 am
October 6, 2008


VincentSylar

Guest

Unfortunately the query string is generate dynamically which may have some parameters before district_id.

3:56 am
October 6, 2008


Jean-Luc

Admin

posts 1125

You wrote: " can I only match the first result. e.g. only match the first district_id in query string "

Just to clarify: your query string will only match one district_id query string anyway even without the ^. I am not sure about which one will be picked up if you have /shop/sr1.htm?district_id=102&district_id=103 .

It is not a good practice to use the same variable name twice in a query string. In my opinion, /shop/sr1.htm?district_id=102,103  would be a much better form than /shop/sr1.htm?district_id=102&district_id=103 . It would be easy to only pick up the first number within district_id=102,103 .

Reply to Post

Reply to Topic:
Multiple parameter

Guest Name (Required):

Guest Email (Required):

NOTE: New Posts are subject to administrator approval before being displayed

Smileys
Confused Cool Cry Embarassed Frown Kiss Laugh Smile Surprised Wink Yell
Post New Reply

Guest URL (required)

Math Required!
What is the sum of:
11 + 7
   


About the InternetOfficer.com Forum

Forum Timezone: UTC 1

Most Users Ever Online: 302

Currently Online:
10 Guests

Currently Browsing this Topic:
1 Guest

Forum Stats:

Groups: 2
Forums: 9
Topics: 638
Posts: 2712

Membership:

There are 257 Members
There have been 305 Guests

There is 1 Admin
There is 1 Moderator

Top Posters:

cssfsu – 55
deepakgupta – 34
albert_newton – 30
cosminpana – 20
DTNMike – 19
ahtshun83 – 17

Recent New Members: raju, todd2taylor, sbdcunha, mansigill1987, ThomasDuh, ThomasKic

Administrators: Jean-Luc (1125 Posts)

Moderators: Jean-Luc (1125 Posts)