473,409 Members | 1,934 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,409 software developers and data experts.

Displaying the top 10 search phrases searched for on a site.

117 100+
I am trying to add this to the search page so it shows the users the top 10 items searched for... like this.

Top 10 Searches:
( free, invincible, lvl skip, skin mod, car, toy, controller, sexy, buy)

[PHP]<?php

$sql = "select * from search_terms order by count desc limit 0,10";

$result = mysql_query($sql ,$db);

if ($myrow = mysql_fetch_array($result)) {

do {

printf("<tr>");
printf("<td width=250>%s</td>", $myrow["term"]);
printf("<td width=50>%s</td>", $myrow["count"]);
printf("</tr>");

} while ($myrow = mysql_fetch_array($result));

}


?>[/PHP]

It works but don't seem to update the code, with the new search tems i just posted. I want it to show only the new ones not the old ones!
Sep 8 '07 #1
2 1548
pbmods
5,821 Expert 4TB
Breana, please read the Posting Guidelines regarding what makes a good thread title.
Sep 8 '07 #2
kovik
1,044 Expert 1GB
It works but don't seem to update the code, with the new search tems i just posted. I want it to show only the new ones not the old ones!
That's because you likely have a lot of searches on the older terms, so adding new ones doesn't necessarily mean they have the same amount of searches. You should make some sort of filtering by the date.
Sep 9 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Stephen Ferg | last post by:
I need a little help here. I'm developing some introductory material on Python for non-programmers. The first draft includes this statement. Is this correct? ...
67
by: Sandy.Pittendrigh | last post by:
Here's a question I don't know the answer to: I have a friend who makes very expensive, hand-made bamboo flyrods. He's widely recognized (in the fishing industry) as one of the 3-5 'best' rod...
83
by: D. Dante Lorenso | last post by:
Trying to use the 'search' in the docs section of PostgreSQL.org is extremely SLOW. Considering this is a website for a database and databases are supposed to be good for indexing content, I'd...
2
by: Noticedtrends | last post by:
Are there search-engine utilities that allow searches of content only contained in titles (as opposed to regular searches that search through all content)? Would any of these search-engine...
1
by: Noticedtrends | last post by:
Hello, I'm seeking search-engine utilities that allow searches of content only contained in titles (as opposed to regular searches that search through all content)? The tools provided in...
25
by: altemurbugra | last post by:
Hi is it possible to make search on for example on google without api with a list of words 1- there is word list 2- the script will take the words from the list by turn 3-it iwll make the search...
3
by: Harry Haller | last post by:
What is the fastest way to search a client-side database? I have about 60-65 kb of data downloaded to the client which is present in 3 dynamically created list boxes. The boxes are filled from 3...
8
by: Roman | last post by:
I received a marketing call from a guy first showing me my website and then some other website and ranking of that other website. My questions is it worth paying to SEO corporation a $1200 -...
3
by: mercuryshipzz | last post by:
#!/usr/bin/perl #use strict; use warnings; sub search_pattern { my $file_name = $_;
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.