vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Find topics with identical titles (https://vborg.vbsupport.ru/showthread.php?t=247267)

charlie71 07-25-2010 02:14 PM

Find topics with identical titles
 
Hello everybody,

on our forum we avoid threads with same titles. It wouldn't be a problem to find these threads by search, but we have about 1000 new topics each day. It's almost impossible to find them manually.

I've build a function to find these topics. First, i query the database. Look at my solution:
PHP Code:

SELECT COUNT(thread.title) AS counter,
thread.forumid,
thread.title 
FROM 
" . TABLE_PREFIX . "thread 
WHERE thread
.forumid IN('31,32,33'
GROUP BY thread.title 
HAVING counter 
>  
ORDER BY counter DESC 

This works pretty fine. Now i get a list with topics that have the same title, like this:

Obama created a monster (5 times) (Search them)
BP spills coffee (4 times) (Search them)
...

Ok, "Search them" is my link to forum-search to find these topics. Then i can merge or delete them.

It goes like this:
search.php?do=process&query=BP+spills+coffee&title only=1&exactname=1&forumchoice[]=31...

But the forum-search is doing wrong. If i search for topics with EXACT title like "BP spills coffee", it shows me:

BP spills coffee one more time
BP spills coffee yesterday

But i want "BP spills coffee" only! I totally stuck on this. What have i missed in my search-query, or what i need to change? Any suggestions?


All times are GMT. The time now is 03:51 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01015 seconds
  • Memory Usage 1,711KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete