Subversion Repositories SmartDukaan

Rev

Rev 17947 | Rev 18246 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 17947 Rev 17978
Line 931... Line 931...
931
				}			
931
				}			
932
			}		
932
			}		
933
		}
933
		}
934
 
934
 
935
		$rand_keys = array_rand(array_keys($temp), 3);
935
		$rand_keys = array_rand(array_keys($temp), 3);
936
		$sql = "select b.id,u.user_id,u.brand,sum(u.weight) w from newuserlinkssegmentation u left join brands b on lower(u.brand) = lower(b.name) where u.user_id = $userId and u.category_id = $categoryId group by u.brand order by w desc limit 5";
936
		$sql = "select b.id,u.user_id,u.brand,sum(u.weight) w from newuserlinkssegmentation u left join brands b on lower(u.brand) = lower(b.name) where u.user_id = $userId and u.category_id = $categoryId and b.category_id=$categoryId group by u.brand order by w desc limit 5";
937
		
937
		
938
		$brands = $this->User->query($sql);
938
		$brands = $this->User->query($sql);
939
		
939
		
940
		$count = 0;
940
		$count = 0;
941
		$iterate= 0;
941
		$iterate= 0;