Hi,
I have a table with content.
Field1 is a keyword-field, containing one keyword.
Field2 is a content-field, containing conent.
My Chaos CMS, has no menus at all! It simply replaces occurrances of keywords INSIDE CONTENT with hyperlinks to the correct content (which contain the keywords).
This is done thru PHP and works perfectly.
eg. Page1:
Keyword: Apple
Text: Apples and Oranges are great!
Page2:
Keyword: Orange
Text: Oranges are better than apples!
In this case, the word Apple will be hyperlinked in page2, and the word Orange will be hyperlinked in page1.
However, my problem is when adding more pages, what if no pages contains some of the keywords that some pages have?
If I where to add Page3 to this example:
Keyword: Peas
Text: Peas is not a fruit, but you can read about Oranges and Apples
In page3, oranges and apples would be hyperlinked, but there is no link from Apples or Oranges to the page about Peas.
This is where my problem comes in, How should I write a select query, for selecting the content containing the keywords that are NOT IN the content?
Something like:
SELECT * FROM tbl_content WHERE content NOT HAVING '%keywords%';
I know that query will not work, but I think you get my point.
I hope someone can help me. I've tried looking thru the manual, but at first glance, I could not see anything that helped me.
Olav Alexander Mjelde
Admin & Webmaster
I have a table with content.
Field1 is a keyword-field, containing one keyword.
Field2 is a content-field, containing conent.
My Chaos CMS, has no menus at all! It simply replaces occurrances of keywords INSIDE CONTENT with hyperlinks to the correct content (which contain the keywords).
This is done thru PHP and works perfectly.
eg. Page1:
Keyword: Apple
Text: Apples and Oranges are great!
Page2:
Keyword: Orange
Text: Oranges are better than apples!
In this case, the word Apple will be hyperlinked in page2, and the word Orange will be hyperlinked in page1.
However, my problem is when adding more pages, what if no pages contains some of the keywords that some pages have?
If I where to add Page3 to this example:
Keyword: Peas
Text: Peas is not a fruit, but you can read about Oranges and Apples
In page3, oranges and apples would be hyperlinked, but there is no link from Apples or Oranges to the page about Peas.
This is where my problem comes in, How should I write a select query, for selecting the content containing the keywords that are NOT IN the content?
Something like:
SELECT * FROM tbl_content WHERE content NOT HAVING '%keywords%';
I know that query will not work, but I think you get my point.
I hope someone can help me. I've tried looking thru the manual, but at first glance, I could not see anything that helped me.
Olav Alexander Mjelde
Admin & Webmaster