I have four tables
NewsItems
1. NewsID
2. NewsTitle
NewsRegion
1. RegionID
2. RegionName
NewsKeyWords
1. KeywordID
2. Keyword
3. RegionID
NewsSorted
1. SortedID
2. NewsID
3. RegionID
What I want to do it loop though each NewsItems and then inside the loop check to see if there is a match in NewsTitle with Words in the NewsKeyWords.
I then want to add the NewsID and the RegionID to a new row in table NewsSorted.
How would I do this??
$result = mysql_qury("SELECT * FROM NewsItems");
while($result = mysql_qury_results){
$Title = $row['NewsTitle'];
/// Do something here to check each word in keywords and then do a if statment if there is match i guess?
}