mirror of
				https://github.com/nerzhul/ocsms.git
				synced 2025-10-31 02:17:38 +00:00 
			
		
		
		
	speed optimization
as count(`fieldname`) does check for NULL values (as they will be excluded) it is faster to use count(*) as the date will never be NULL anyway (NULLs are not allowed at all 😄 )
			
			
This commit is contained in:
		
							parent
							
								
									75e3e409ac
								
							
						
					
					
						commit
						5755ab800f
					
				| @ -153,7 +153,7 @@ class SmsMapper extends Mapper { | ||||
| 		$cnt = 0; | ||||
| 		$phlst = $this->getAllPhoneNumbersForFPN ($userId, $phoneNumber, $country); | ||||
| 
 | ||||
| 		$query = \OCP\DB::prepare('SELECT count(sms_date) as ct FROM ' . | ||||
| 		$query = \OCP\DB::prepare('SELECT count(*) as ct FROM ' . | ||||
| 		'*PREFIX*ocsms_smsdatas WHERE user_id = ? AND sms_address = ? ' . | ||||
| 		'AND sms_mailbox IN (?,?)'); | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user