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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T16:33:20+00:00 2026-06-10T16:33:20+00:00

I have a SELECT query where you search by car owners. Every owner can

  • 0

I have a SELECT query where you search by car owners.
Every owner can have more than one car.
There is random generated list of cars of which we have to find owners.

...

$owners[] = $dbaseowners["ownerid"] // owner ID's fetched from database

$owners = implode (',',$owners);

SELECT carname FROM cars WHERE ownerid IN ($owners);

My problem is when one owner is used more than once for example: IN (1,1,4,1) – mysql only fetch one ‘copy’ of this owner’s data.

Since i have a randomly generated car list, I have to have owner row for every car no matter if owner is the same.

Any ideas?

  • 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-10T16:33:21+00:00Added an answer on June 10, 2026 at 4:33 pm

    I believe you have to revise your design and have a join table to relate the owners to cars. Having 1,1,4,1 in one row of table is not compliant with the first normal form and you should avoid using it.

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

Sidebar

Related Questions

I have this query where I can search the TABLE_GLOBAL_PRODUCTS $catglobal_sql = select p.*,
I have this sql query: SELECT S.SEARCH, S.STATUS, C.TITLE AS CategoryName, E.SEARCH_ENGINES AS Engine,
If I have the following full text search query: SELECT * FROM dbo.Product INNER
I have the following: @Entity @NamedQuery(name = listCarsBySecurity, query = SELECT c FROM Car
I have simple search application How can I search by Categories using <select><option></select> the
hello i have a select query that is integrated in a search function: i
I have a functioning mySQL search system. mysql_query(SELECT * FROM electors WHERE constituency =
Lets assume i have a query like the following $query_search = SELECT * FROM
I have a SELECT query that I am expecting millions of results from. I
I have a select query in mysql . On each execution of this query

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.