GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 02-Sep-2002, 11:21
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough

'Related articles' php /mysql question


OK, i am stumped; or a case of too much PHP...

i am trying to figure out how i can add a 'related article' column onto my new design for this site.

right now, i have a table that holds details of every article, (i.e. keywords, html, title, desc, etc - each with it's own id), so how would i manage listing a related articles column for a given webpage?
  #2  
Old 04-Sep-2002, 19:03
Garth Farley Garth Farley is offline
Awaiting Email Confirmation
 
Join Date: May 2002
Location: Ireland
Posts: 638
Garth Farley is a jewel in the roughGarth Farley is a jewel in the roughGarth Farley is a jewel in the rough
What makes sense to me to do is:

Add a column to this table with certain keywords, and each article would have 5 or 6 keywords. Then for related articles, do a search of this column using the keywords you've set for the current article.

So for instance, having

Code:
id | subject | keywords | text ------------------------------------ 1 | Databases with PHP | php,database,mysql,postgresql,dynamic | Blah de blah.... 2 | MySql Optimisation | mysql,optimisation,database,table,speed | So to do....

So when you're at "Databases with PHP", you use it's keywords to scan the table again, specifically the "Keywords" column, searching for occurances. The more occurances, the more related it is.

Note I've ont thought of a goos SQL query to do this, comma deliminated lists are never great with scanning tables, so it needs improvement.

But as Microsofts latest campaign said for a short while, it just works.

Garth Farley
  #3  
Old 05-Sep-2002, 09:39
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
Quote:
Note I've ont thought of a goos SQL query to do this, comma deliminated lists are never great with scanning tables, so it needs improvement.

definitely something i don't want to do but that gave me an idea that i hadn't thot about!
  #4  
Old 05-Sep-2002, 18:56
Garth Farley Garth Farley is offline
Awaiting Email Confirmation
 
Join Date: May 2002
Location: Ireland
Posts: 638
Garth Farley is a jewel in the roughGarth Farley is a jewel in the roughGarth Farley is a jewel in the rough
Quote:
Note I've ont thought of a goos SQL query to do this,

Good Lord! Look at the state of my spelling

A terribly ashamed
Garth Farley
  #5  
Old 06-Sep-2002, 11:17
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
no, i was not talking about ur spelling tho i agree
 
 

Recent GIDBlogOnce again, no time for hobbies by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

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 Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about loading php into tables or css pcxgamer Web Design Forum 6 17-Sep-2005 22:08
All the big PHP script collections that matter jrobbio MySQL / PHP Forum 5 06-Jun-2003 17:14
PHP Sessions question JdS MySQL / PHP Forum 2 16-Jul-2002 05:58

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 01:02.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.