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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T02:21:57+00:00 2026-06-12T02:21:57+00:00

I am rolling my own functionality for a well known cart. Here is my

  • 0

I am rolling my own functionality for a well known cart. Here is my query:

    SELECT d.product, d.product_id, p.price FROM cscart_product_descriptions AS d, cscart_product_prices AS p WHERE d.product_id IN (
SELECT product_id FROM cscart_products WHERE product_code IN (
SELECT product_id FROM cscart_range WHERE range_name IN (
SELECT range_name FROM cscart_range WHERE product_id = '0140885'
)))

When I remove the product_prices related selection from the first select, I get three items returned as expected. When I run it with the prices included, I get something like 4,500 results.

I am aware that this is a joining issue, I’m just not certain how to correct it.

Cheers!

  • 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-12T02:21:58+00:00Added an answer on June 12, 2026 at 2:21 am

    Its doing a cross join with cscart_product_prices table..

    you could try something like this:

     select a.*,p.price from (
          SELECT d.product, d.product_id 
          FROM cscart_product_descriptions AS d 
          WHERE d.product_id IN (
             SELECT product_id FROM cscart_products WHERE product_code IN (
             SELECT product_id FROM cscart_range WHERE range_name IN (
             SELECT range_name FROM cscart_range WHERE product_id = '0140885'
             )))a
    join cscart_product_prices AS p
    on p.product_id=a.product_id
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Before jumping in and rolling my own, I thought I'd ask in here first.
I'm rolling my own ActivatableCollection<T> for db4o but cribbing heavily from the builtin ActivatableList<T>
Apart from rolling my own collection, I'm wondering which existing (.NET 3.5) Collection and
Rolling my own twitter style service within another product using php, and it just
I see a number of posts talk about rolling your own LINQ to SQL
I'm looking for a good Wizard library in Flex before rolling my own. The
I am rolling my own simple web-based perfmon, I am not happy with some
I am rolling my own blog framework, mainly to learn how everything works. I
I often end up rolling my own wrapper/extension methods for/around System.Uri and was wondering
Rather than possibly reinventing the wheel (by rolling my own) - I thought I'd

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.