About 4, which is why i can't imagine what i am doing wrong. If you think that the query looks right i will go through everything again and check. thx. Ruki
> Subject: Re: [ts] Re: has_many through > From: [email protected] > Date: Sat, 3 Jul 2010 13:50:53 +1000 > To: [email protected] > > Hmm, that all looks okay. How many stores are attached to products? > > -- > Pat > > On 03/07/2010, at 2:43 AM, Ruki Osa wrote: > > > Hi Pat > > > > SELECT `products`.`id` * 1 + 0 AS `id` , CAST(`products`.`name` AS > > CHAR) AS `name`, CAST(`products`.`id` AS CHAR) AS `id`, > > CAST(`products`.`description` AS CHAR) AS `description`, > > CAST(`products`.`age` AS CHAR) AS `age`, CAST(`products`.`productType` > > AS CHAR) AS `productType`, CAST(`brands`.`name` AS CHAR) AS > > `brandName`, CAST(GROUP_CONCAT(DISTINCT `stores`.`name` SEPARATOR ' ') > > AS CHAR) AS `storeName`, `products`.`id` AS `sphinx_internal_id`, > > 485965105 AS `class_crc`, '485965105' AS `subclass_crcs`, 0 AS > > `sphinx_deleted` FROM `products` LEFT OUTER JOIN `brands` ON > > `brands`.id = `products`.brand_id LEFT OUTER JOIN `inventorizations` > > ON (`products`.`id` = `inventorizations`.`product_id`) LEFT OUTER > > JOIN `stores` ON (`stores`.`id` = `inventorizations`.`store_id`) > > WHERE `products`.`id` >= $start AND `products`.`id` <= $end GROUP BY > > `products`.`id` ORDER BY NULL > > > > > > thx > > > > -- > > You received this message because you are subscribed to the Google Groups > > "Thinking Sphinx" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group at > > http://groups.google.com/group/thinking-sphinx?hl=en. > > > > -- > You received this message because you are subscribed to the Google Groups > "Thinking Sphinx" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/thinking-sphinx?hl=en. > _________________________________________________________________ http://clk.atdmt.com/UKM/go/197222280/direct/01/ Do you have a story that started on Hotmail? Tell us now -- You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
