Subversion Repositories SmartDukaan

Rev

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

Rev 16351 Rev 16352
Line 188... Line 188...
188
		} else{
188
		} else{
189
			$sql = "SELECT DATE( created ) date, count(id) AS count,count(distinct user_id) as countUserId, SUBSTRING_INDEX(SUBSTRING_INDEX( url,  '/', -1 ),  '/', -1 ) AS skuBundleId FROM  `user_urls` WHERE SUBSTRING_INDEX( url,  '/', -1 ) = $product group by date(created) ORDER BY id DESC ";
189
			$sql = "SELECT DATE( created ) date, count(id) AS count,count(distinct user_id) as countUserId, SUBSTRING_INDEX(SUBSTRING_INDEX( url,  '/', -1 ),  '/', -1 ) AS skuBundleId FROM  `user_urls` WHERE SUBSTRING_INDEX( url,  '/', -1 ) = $product group by date(created) ORDER BY id DESC ";
190
			$product_count = $this->UserUrl->query($sql);
190
			$product_count = $this->UserUrl->query($sql);
191
			$this->set(compact('product_count','product'));
191
			$this->set(compact('product_count','product'));
192
		}	
192
		}	
193
		echo $sql;
-
 
194
		$params = array(
193
		$params = array(
195
			'fields' => array('skuBundleId','brand','source_product_name'),
194
			'fields' => array('skuBundleId','brand','source_product_name'),
196
			'conditions' => array('source_id' => array('$ne' => 0)),
195
			'conditions' => array('source_id' => array('$ne' => 0)),
197
			'order' => array('_id' => 1),
196
			'order' => array('_id' => 1),
198
		);
197
		);