Subversion Repositories SmartDukaan

Rev

Rev 16932 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 16932 Rev 16934
Line 21... Line 21...
21
 * @return void
21
 * @return void
22
 */
22
 */
23
	public function admin_index() {
23
	public function admin_index() {
24
		$this->PaytmCalling->recursive = -1;
24
		$this->PaytmCalling->recursive = -1;
25
		$userIds = $this->PaytmCalling->find('list');
25
		$userIds = $this->PaytmCalling->find('list');
26
		$sql = "SELECT u.id,u.first_name,u.email,u.mobile_number FROM users u JOIN paytm_coupon_non_usages p on p.user_id=u.id order by p.created";
26
		//$sql = "SELECT u.id,u.first_name,u.email,u.mobile_number FROM users u JOIN paytm_coupon_non_usages p on p.user_id=u.id order by p.created";
-
 
27
		$sql = "SELECT u.id,u.first_name,u.email,u.mobile_number FROM users u JOIN (select o.user_id, o.created from orders o where o.id not in (select order_id from paytm_coupon_usages) and store_id=6 and status='ORDER_CREATED')p on p.user_id=u.id where u.referrer not like '%emp%' order by p.created";
27
		$users = $this->PaytmCalling->query($sql);
28
		$users = $this->PaytmCalling->query($sql);
28
		$this->set('users', $users);
29
		$this->set('users', $users);
29
	}
30
	}
30
 
31
 
31
/**
32
/**