If you add - as I have done - Guestbook section to several pages - then an the way searching is constructed generates erroneus results (way too many). The reason is this. Guestbook enters the following code into the Search table:
SELECT [TP]pages.page_id, [TP]pages.page_title, [TP]pages.link FROM [TP]mod_guestbook, [TP]mod_guestbook_setti
ngs, [TP]pages WHERE [TP]pages.page_id = [TP]mod_guestbook_setti
ngs.page_id AND [TP]mod_guestbook.name
- \'[W][STRING][W]\' .... etc.
It is not clear to me why mod_guestbook_setti
ngs is referenced here, and the result is that if there is a search match in one of the mod_guestbook columns, then all pages pointed to by mod_guestbook_setti
ngs.page_id are returned as hits. This, of course, is wrong.
I suggest the following code instead (removing mod_guestbook_setti
ngs and linking pages and mod_guestbook on page_id instead)
query_start:SELECT [TP]pages.page_id, [TP]pages.page_title, [TP]pages.link FROM [TP]mod_guestbook, [TP]pages WHERE
query_body:[TP]pages.page_id = [TP]mod_guestbook.page_
id AND [TP]mod_guestbook.name
- \'[W][STRING][W]\' AND [TP]pages.searching = \'1\' OR
[TP]pages.page_id = [TP]mod_guestbook.page_
id AND [TP]mod_guestbook.email
- \'[W][STRING][W]\' AND [TP]pages.searching = \'1\' OR
[TP]pages.page_id = [TP]mod_guestbook.page_
id AND [TP]mod_guestbook.homep
age
- \'[W][STRING][W]\' AND [TP]pages.searching = \'1\' OR
[TP]pages.page_id = [TP]mod_guestbook.page_
id AND [TP]mod_guestbook.messa
ge
- \'[W][STRING][W]\' AND [TP]pages.searching = \'1\'
This code produces correct search results on my site.