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 7591833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T20:45:00+00:00 2026-05-30T20:45:00+00:00

in my current project, the task is to be able to search through 6

  • 0

in my current project, the task is to be able to search through 6 tables.

Tables are:
A, B, C, D, E, F

All tables are related to each other through another table in the list.

E.g. A->B B->A->C C->F F->D

Like User->Phonenumber Phonenumber->Country etc.

Since the searchmask/form the user gets presented leaves the possibility open to send only certain parameters to the server it occurs that the search must find a result R no matter which parameter the user passes through.

In this case a parameter is a column value of any of the above listed tables, e.g. Phonenumber->Provider = Verizon means, the user wants all entries with the provider = Verizon.

The actual problem is not searching in specific tables, it is searching in specific tables an retrieving the right result from the results you found in the specific tables.

Let me explain: Result, in our case is NOT a table object of the table we currently searched through.

A Result should always be the same object Result which must have at least one entry in A and B.
Example Requirements:
A = User exists
B = he has a Phonenumber

Since all tables have relations to each other directly or indirectly we could access a result without searching for columns in A or B only by looking into the related tables retrieving the rows with Provider=Verizon and JOINing on the related tables via ids/keys/constraints.

Currently I do more than one query.
I first check the type of the parameters.
“Are they columns from A to C”
Yes, then do a direct SELECT on A, B or C and take the result as Result.

“Are they columns from E”
Yes, then do a SELECT on E, after that another SELECT on C with c_id from E.

As Result (in PHP) I always want to have an object/array containing A.value1, B.value1
I never want any information about C, D, E or F.
I only want to get Result consisting of A.value1 and B.value1 by any allowed/searchable parameter that is represented in a column in one or more of the tables, e.g. Provider=Verizon AND Country=China AND OnVaccation=True

I am sorry for the complexity.

  • 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-30T20:45:02+00:00Added an answer on May 30, 2026 at 8:45 pm

    I think, for this you could use Sphinx Search Engine at http://sphinxsearch.com/ . You should set up SQL query which will be used for building search index. After this from PHP you could use simple API for performing search.

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

Sidebar

Related Questions

I have these tables and relationships: user has_many projects project has_many tasks task has_many
On a current project which I'm currently working, i have a symfony task that
my current project is based on Entity Framwork code-first. I have three types: Task,
I have a form in my existing project. My current task is to make
Here is where I am at right now. I have four tables: task, project,
In my current project, some tables have a column named changed, which indicates if
I have a project which provides users with a list of current tasks that
For my current project in codeignitor I needed to make user profile like this
My current project is in Rails. Coming from a Symfony (PHP) and Django (Python)
My current project uses NUnit for unit tests and to drive UATs written with

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.