What I wanted is when the search script adds the query in the querylog table it should remove the quotes and capitalize first letter of each word so that I can improve the accuracy of report I am generating every week.
Thanks. I don't think the initcap() reference is in the manual or may be I overlooked.
<sql novars "insert into querylog values(counter,$REMOTE_HOST,$qinfo,$query)"></sql>
right before this line, I want to take $query and remove quotes and apply initcap to it. I am having problems using sandr to remove quotes. Please give me a way so that I can remove Quotes from the query.
I am doing,
<if $query ne ""><!-- there was a query -->
<sandr "\"" $Query> (I AM DOING IT WRONG..., I WANT TO REMOVE QUOTES HERE)
<initcap $ret> (CHANGE TO INIT CAPS HERE)
<$query=$ret> (READY TO BE INSERTED IN QUERYLOG)
2) This is about querying querylog table. I want to get popular searches (We are promoting most pressing topics in our industry and different organization are trying it out as well)
The following is the sql statement I am using,
"select distinct Client, Query, count(distinct Query) No from querylog where Query not matches 'http%' group by Query Order By No"
the No. comes out to be all 1's. What I want to get is the number of how many different ip addresses are typing in the same search term.