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

  • Home
  • SEARCH
  • 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 8649013
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T13:27:17+00:00 2026-06-12T13:27:17+00:00

i have a search query which will retrieve information from 3 tables i made

  • 0

i have a search query which will retrieve information from 3 tables i made the query so it retrieve the information from 2 tables and i don’t know if i can combine the third one or not

SELECT *
FROM articles
INNER JOIN terms
ON articles.ArticleID = terms.RelatedID AND terms.TermType = 'article'

the third query is

SELECT * FROM categories where CategoryID in (something)

something is a filed in the articles tables which have value like ‘3,5,8’

i want do this 2 queries into 1 query and i don’t know if it can be done by 1 query or not

  • 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-06-12T13:27:18+00:00Added an answer on June 12, 2026 at 1:27 pm

    without looking at your schema (which would be helpful) and some sample data try this query

    SELECT *
    FROM categories,articles
    INNER JOIN terms
    ON (articles.ArticleID = terms.RelatedID AND terms.TermType = 'article')
    WHERE
    FIND_IN_SET(categories.CategoryID,articles.categories)
    

    here is the definition for FIND_IN_SET()

    http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_find-in-set

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written a query which will perform Full Text search using full search
I'm try to create a query which will search four different tables with one
I have a search form used to query service provisions, which I will call
I have a T-SQL query as below which queries a table holding the search
I have a script which allows to display search results. Given a query there
I have a dynamic search query with join multiple tables, for showing sum and
I have a problem with my search query, $s_query. The user can search a
Okay, so I have a website where the user can put a search query
I have this query where I can search the TABLE_GLOBAL_PRODUCTS $catglobal_sql = select p.*,
We have some search functionality that can return tens of thousands of results from

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.