Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6682011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:39:23+00:00 2026-05-26T04:39:23+00:00

I have a site up and the search feature was very basic and always

  • 0

I have a site up and the search feature was very basic and always has done what it needs to do.
I now want to incorperate a value from another table into the search which gets a bit tricky.

I want to return a complete set of results from one query, but the new info only relates (via id) the the data in the other table which I want to return.

I currently have

SELECT      *
FROM        [TABLE]
WHERE       ( LOWER(title) LIKE '%$search%'
              OR LOWER(contents) LIKE '%$search%'
            )
            AND type = 'product'

in the other table there is a col called id (same as the other which are related) and another meta_value.

I want to not only do the operation above but also search the meta_value data, if a match get the results from the other table (using the id).

If any one understands what I am saying and it is possible then I would be muchly appreciated if you could push me in the right direction.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T04:39:24+00:00Added an answer on May 26, 2026 at 4:39 am

    You can join the two tables using their IDs using the LEFT JOIN command. You can then filter on columns in either table.

    SELECT *
    FROM [TABLE] t1
    LEFT JOIN otherTable t2 on t1.ID=t2.ID
    WHERE
      (
        LOWER(t1.title) LIKE '%$search%' 
        OR LOWER(t1.contents) LIKE '%$search%'
        OR LOWER(t2.meta_value) LIKE '%$search%'
      )
      AND t1.type = 'product'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a site collection and I want to set the search center value
I have a search feature on my site that's POST based. Now, however, I
I have a search functionality on my site that is accessible from every page.
if i have a search function for my site and i want the user's
I have built a search feature for a product site. The search works fine.
I'm implementing a basic search feature for a site I'm working on. The cleanest
I have signed up(paid) for Google site search. They have me a url of
I have a TYPO3 site with Indexed Search Engine extension... The problem is that
On my site I have mod_rewrite rules to make the URLs more search engine
Alright...I've given the site a fair search and have read over many posts about

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.