Commit f2403d5fe2d9caf802ecea10f0ac2d9f6e9cc0c1

Authored by Alex Savenko
2 parents 4f14e82f 138315b3

Merge branch 'discount' of gitlab.artweb.com.ua:Alex/semena

Showing 1 changed file with 2 additions and 4 deletions   Show diff stats
src/lib/models/discount.php
@@ -56,21 +56,19 @@ class discount extends \db @@ -56,21 +56,19 @@ class discount extends \db
56 56
57 /** 57 /**
58 * Get actual discount 58 * Get actual discount
59 - * @param $id  
60 * @return array 59 * @return array
61 */ 60 */
62 - public function getActiveData($id) 61 + public function getActiveData()
63 { 62 {
64 return $this->get( 63 return $this->get(
65 ' 64 '
66 SELECT * 65 SELECT *
67 FROM public.discount 66 FROM public.discount
68 WHERE 67 WHERE
69 - id = :id  
70 - AND  
71 current_timestamp > start_date 68 current_timestamp > start_date
72 AND 69 AND
73 current_timestamp < end_date 70 current_timestamp < end_date
  71 + LIMIT 1
74 72
75 ', 73 ',
76 [ 74 [