Jump to content

Subquery Issue


DarkHouse

Recommended Posts

Hello everyone, I have a query http://sql.pastebin.com/d3398502e and it's a bit of a monster.  It's a search query for a hotel site, like expedia, but it needs the ability to get different prices for children in a room based on their age. 

 

Each hotel can have age groups, so it needs to figure out how many children are in each age group for that hotel (which works, that's all the UNIONs), and then apply the price associated with that age group to the number of children for that hotel for that date. 

 

That's where I'm stuck since the price data for that date is not available in the subquery. 

 

The way I have it now it's selecting all dates that have child prices applied and adding those together, rather than just the one date.

 

I appreciate any help I can get.  Thanks!

Link to comment
https://forums.phpfreaks.com/topic/114083-subquery-issue/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.