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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:11:59+00:00 2026-05-25T01:11:59+00:00

Im reposting this problem in a simpler fashion, as I was getting comments about

  • 0

Im reposting this problem in a simpler fashion, as I was getting comments about it being too specific:

Based on the following travel model relationships, how do I select all Itineraries with at least one Stop in Region X, and still have the query return ALL the Stops for that Itinerary, even if the other Stops are in Regions other than X

I’m using Php and MySQL and Doctrine.

Region HAS MANY Country
Country HAS MANY Area
Area HAS MANY Property
Property HAS MANY Stop 
Itinerary HAS MANY Stop
  • 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-25T01:12:00+00:00Added an answer on May 25, 2026 at 1:12 am
    SELECT * from Itinerary where id in(
    SELECT DISTINCT Itinerary.id
    FROM Itinerary
    LEFT JOIN Stop on Itinerary.something = Stop.something
    LEFT JOIN Property ON Stop.something=Property.something
    LEFT JOIN Area ON Area.something=Property.something
    LEFT JOIN Country ON Country.something=Area.something
    LEFT JOIN Region ON Region.something = Country.something
    WHERE Region.something = X)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am reposting this question due to inability to solve the problem (original here
Following this question: Good crash reporting library in c# Is there any library like
This is about when a .NET remoting exception is thrown. If you take a
I'm having this problem when I tried to extract information from excel files. Here's
This is a nasty problem, and it might be that the design is just
This is an interesting problem that I’ve not been able to solve yet. I
Somebody please help me out. This problem is killing me. I went through tones
Consider the following image: This is supposed to look like a patch of grass
I'm reposting this question as I didn't get much of a response last time,
Looking for suggestions on how to approach this problem and to understand if Domain

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.