Welcome Guest, Not a member yet? Register   Sign In
ActiveRecord Expert Needed!
#6

[eluser]LifeSteala[/eluser]
Hi Brad,
You actually require two queries to perform what is that you need. I would write some code but I need to popout in a few minutes so I'll try explain the idea.

Query 1: Select all products
Query 2: For each product (Query 1), get me it's meta data

So, you need to loop through each product (derived from query 1) and then with each product id, do another query getting the meta data for that particular product id.

As it loops, you will get all meta data, for each product.

The join that you are doing is not right for this requirement.

Hope that helps..

Edit: waldmeister's above post is what I was talking about.. just didn't reply quick enough. I'm off cya! Good Luck!


Messages In This Thread
ActiveRecord Expert Needed! - by El Forum - 08-20-2009, 12:28 AM
ActiveRecord Expert Needed! - by El Forum - 08-20-2009, 01:11 AM
ActiveRecord Expert Needed! - by El Forum - 08-20-2009, 01:21 AM
ActiveRecord Expert Needed! - by El Forum - 08-20-2009, 01:33 AM
ActiveRecord Expert Needed! - by El Forum - 08-20-2009, 01:36 AM
ActiveRecord Expert Needed! - by El Forum - 08-20-2009, 01:39 AM
ActiveRecord Expert Needed! - by El Forum - 08-20-2009, 02:11 PM



Theme © iAndrew 2016 - Forum software by © MyBB