Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter markval

    (@markval)

    Hi mrmist,

    I have put the two colums as FULLTEXT but it still didn’t work so I have change my QUERY a bit to:

    SELECT * FROM wp_posts
    WHERE post_title LIKE ‘%mySearchText%’ OR post_content LIKE ‘%mySearchText%’
    AND post_status = ‘publish’
    AND post_type = ‘post’

    And now it works but I think it have a draw back. The first option could search for 2 words. Ex: (mySearchText no)
    While my new QUERY will search for the whole sentence instead of 2 separate word.

    With the first QUERY I was hable to search in one column at a time but with no result. Even if the words were in the column with the same Case.

    Any Idea how I could make it work for 2 separate words or more in one query?

    Thread Starter markval

    (@markval)

    Wow this will help me out a lot!

    Thank you very much!

    I do understand how it works now and it is pretty simple in some way!

    You either don’t have a post in your categories or you didn’t publish them.

Viewing 3 replies - 1 through 3 (of 3 total)