Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Lionsanime Directory   Improve your ranking, submit to directories   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 08-23-2004, 02:06 AM   #1 (permalink)
Inactive
 
Join Date: 01-20-04
Location: England
Posts: 353
iTrader: 0 / 0%
Latest Blog:
None

cray is a jewel in the roughcray is a jewel in the roughcray is a jewel in the roughcray is a jewel in the roughcray is a jewel in the roughcray is a jewel in the roughcray is a jewel in the roughcray is a jewel in the rough
Last 10 Searches - Directory Script

Hi all,

Can anyone push me in the right direction for how to create a "View Last 10 Searches" page like the one on wowdirectory in php?

Many Thanks
cray is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 08-23-2004, 06:12 AM   #2 (permalink)
v7n Mentor
 
hatchet's Avatar
 
Join Date: 10-11-03
Posts: 1,137
iTrader: 0 / 0%
Latest Blog:
None

hatchet is just really nicehatchet is just really nicehatchet is just really nicehatchet is just really nicehatchet is just really nicehatchet is just really nicehatchet is just really nicehatchet is just really nicehatchet is just really nicehatchet is just really nicehatchet is just really nice
First you'll need some type of flat file or database that stores the search strings. Then do a select like
SELECT search FROM searchstring ORDER DESC LIMIT 10
hatchet is offline  
Add Post to del.icio.us
Reply With Quote
Old 08-23-2004, 06:15 AM   #3 (permalink)
v7n Mentor
 
hatchet's Avatar
 
Join Date: 10-11-03
Posts: 1,137
iTrader: 0 / 0%
Latest Blog:
None

hatchet is just really nicehatchet is just really nicehatchet is just really nicehatchet is just really nicehatchet is just really nicehatchet is just really nicehatchet is just really nicehatchet is just really nicehatchet is just really nicehatchet is just really nicehatchet is just really nice
oops.. your table searchstring should have 2 columns - id and search.. then do your select
SELECT * FROM searchstring ORDER BY id DESC LIMIT 10
hatchet is offline  
Add Post to del.icio.us
Reply With Quote
Old 08-23-2004, 08:04 AM   #4 (permalink)
Inactive
 
Join Date: 01-20-04
Location: England
Posts: 353
iTrader: 0 / 0%
Latest Blog:
None

cray is a jewel in the roughcray is a jewel in the roughcray is a jewel in the roughcray is a jewel in the roughcray is a jewel in the roughcray is a jewel in the roughcray is a jewel in the roughcray is a jewel in the rough
Thanks hatchet, sorry I am not good with this stuff, how would I store each search query everytime someone searches?
cray is offline  
Add Post to del.icio.us
Reply With Quote
Old 08-23-2004, 08:30 AM   #5 (permalink)
v7n Mentor
 
hatchet's Avatar
 
Join Date: 10-11-03
Posts: 1,137
iTrader: 0 / 0%
Latest Blog:
None

hatchet is just really nicehatchet is just really nicehatchet is just really nicehatchet is just really nicehatchet is just really nicehatchet is just really nicehatchet is just really nicehatchet is just really nicehatchet is just really nicehatchet is just really nicehatchet is just really nice
You have the search functions already in place I assume.. at the end of that call another function to insert it into the searchstring table..
function addlastsearch($q) {
$q=trim(addslashes($q));
$sql="INSERT INTO searchstring (id, string) VALUES ('', '$q');
$result=mysql_query($sql) or DIE("Could not insert");
}

Something like that anyway.
hatchet is offline  
Add Post to del.icio.us
Reply With Quote
Old 08-23-2004, 09:20 AM   #6 (permalink)
Inactive
 
Join Date: 01-20-04
Location: England
Posts: 353
iTrader: 0 / 0%
Latest Blog:
None

cray is a jewel in the roughcray is a jewel in the roughcray is a jewel in the roughcray is a jewel in the roughcray is a jewel in the roughcray is a jewel in the roughcray is a jewel in the roughcray is a jewel in the rough


Thanks Hatchet, I will hack around with it and see what happens!
cray is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
V7N Directory - It gets searches! John Scott V7N Directory Issues 72 08-23-2006 12:47 AM
Article Directory Script from Fantastico CMS Script websiteideas Coding Forum 1 05-21-2006 01:58 AM
What directory script do you use and why? Nick Web Directory Issues 12 04-24-2006 11:45 PM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 11:13 PM.
© Copyright 2008 V7 Inc