SELECT DISTINCT COUNT(*) AS occurences, post_name, post_content FROM wp_posts WHERE ((post_name LIKE '%ihop%' OR post_content LIKE '%ihop%') OR(post_name LIKE '%pancak%' OR post_content LIKE '%pancak%')) ORDER BY occurences DESC
I use wordpress and am writing a script. Here is the table:
post_name ihop
post_content pancake house
Thanks,
Ian