Price database and confusing SQL query |
[eluser]MarcL[/eluser]
I read that the people on the Code Igniter website were helpful but I didn't expect replies in under an hour. Thanks guys! @umefarooq Yes, there will be products with multiple prices from multiple merchants. I'm trying to record the change in prices over time and find out which merchant is the cheapest. Like a price comparison website. @obiron2 Thanks for the SQL. But the 'get latest prices' hasn't quite worked. The data I've got in the prices array for a certain product id (435) is: Code: product_id merchant_id price created_on When I run the query I get Code: merchant_id price max(p.created_on) name description Any ideas? |
Messages In This Thread |
Price database and confusing SQL query - by El Forum - 02-17-2009, 05:13 AM
Price database and confusing SQL query - by El Forum - 02-17-2009, 05:55 AM
Price database and confusing SQL query - by El Forum - 02-17-2009, 06:04 AM
Price database and confusing SQL query - by El Forum - 02-17-2009, 06:43 AM
Price database and confusing SQL query - by El Forum - 02-17-2009, 07:39 AM
Price database and confusing SQL query - by El Forum - 02-17-2009, 10:00 AM
Price database and confusing SQL query - by El Forum - 02-17-2009, 01:39 PM
Price database and confusing SQL query - by El Forum - 02-17-2009, 03:06 PM
Price database and confusing SQL query - by El Forum - 02-17-2009, 03:18 PM
Price database and confusing SQL query - by El Forum - 02-17-2009, 03:40 PM
Price database and confusing SQL query - by El Forum - 02-17-2009, 11:14 PM
Price database and confusing SQL query - by El Forum - 02-18-2009, 03:10 AM
Price database and confusing SQL query - by El Forum - 02-18-2009, 06:59 PM
|