array(4) {
  ["hasError"]=>
  bool(false)
  ["ResponseObj"]=>
  array(1) {
    ["Items"]=>
    array(4) {
      [0]=>
      array(41) {
        ["row_num"]=>
        string(1) "1"
        ["uid"]=>
        string(4) "6379"
        ["master_id"]=>
        string(2) "16"
        ["locale"]=>
        string(2) "en"
        ["ranking"]=>
        string(1) "1"
        ["display_date"]=>
        string(19) "2017-05-02 00:00:00"
        ["store"]=>
        string(3) "cwb"
        ["title"]=>
        string(16) "SOGO Weekly News"
        ["event_period"]=>
        string(13) "3/5-11/5/2017"
        ["template"]=>
        string(1) "1"
        ["description"]=>
        string(0) ""
        ["pdf"]=>
        string(0) ""
        ["url_name"]=>
        string(0) ""
        ["happening"]=>
        string(1) "1"
        ["highlight"]=>
        string(1) "1"
        ["show_at_index"]=>
        string(1) "1"
        ["thumbnail"]=>
        string(83) "/uploads/images/mainsite/event%26promotion/original_image/201753/cwb_sogonews_s.jpg"
        ["thumb_alt"]=>
        string(16) "SOGO Weekly News"
        ["index_image"]=>
        string(57) "/uploads/images/mainsite/event%26promotion/eventImg_s.jpg"
        ["index_alt"]=>
        string(16) "SOGO Weekly News"
        ["link"]=>
        string(0) ""
        ["popup_type"]=>
        string(1) "1"
        ["happening_end_date"]=>
        string(19) "2017-05-12 00:00:00"
        ["extracted_pdf"]=>
        string(1) "0"
        ["version"]=>
        string(3) "196"
        ["created_by"]=>
        string(1) "1"
        ["created_date"]=>
        string(19) "2014-05-09 13:18:34"
        ["created_ip"]=>
        string(14) "192.168.176.57"
        ["modified_by"]=>
        string(1) "1"
        ["modified_date"]=>
        string(19) "2017-05-08 14:52:09"
        ["modified_ip"]=>
        string(9) "127.0.0.1"
        ["approved_by"]=>
        NULL
        ["approved_date"]=>
        NULL
        ["approved_ip"]=>
        NULL
        ["submitted_by"]=>
        string(1) "1"
        ["submitted_date"]=>
        string(19) "2017-05-08 16:14:26"
        ["submitted_ip"]=>
        string(9) "127.0.0.1"
        ["commited"]=>
        string(1) "1"
        ["approval_status"]=>
        string(1) "3"
        ["active"]=>
        string(1) "1"
        ["deleted"]=>
        string(1) "0"
      }
      [1]=>
      array(41) {
        ["row_num"]=>
        string(1) "2"
        ["uid"]=>
        string(4) "6358"
        ["master_id"]=>
        string(3) "151"
        ["locale"]=>
        string(2) "en"
        ["ranking"]=>
        string(1) "4"
        ["display_date"]=>
        string(19) "2017-05-05 00:00:00"
        ["store"]=>
        string(3) "cwb"
        ["title"]=>
        string(47) "Pre-Thankful Week SOGO BEAUTY VIP Shopping Days"
        ["event_period"]=>
        string(12) "5/5-7/5/2017"
        ["template"]=>
        string(1) "1"
        ["description"]=>
        string(0) ""
        ["pdf"]=>
        string(0) ""
        ["url_name"]=>
        string(0) ""
        ["happening"]=>
        string(1) "1"
        ["highlight"]=>
        string(1) "1"
        ["show_at_index"]=>
        string(1) "1"
        ["thumbnail"]=>
        string(76) "/uploads/images/mainsite/event%26promotion/original_image/201753/cwb16_s.jpg"
        ["thumb_alt"]=>
        string(0) ""
        ["index_image"]=>
        string(59) "/uploads/images/mainsite/event%26promotion/event_img16f.jpg"
        ["index_alt"]=>
        string(0) ""
        ["link"]=>
        string(0) ""
        ["popup_type"]=>
        string(1) "1"
        ["happening_end_date"]=>
        string(19) "2017-05-08 00:00:00"
        ["extracted_pdf"]=>
        string(1) "0"
        ["version"]=>
        string(2) "65"
        ["created_by"]=>
        string(1) "1"
        ["created_date"]=>
        string(19) "2015-11-17 16:24:38"
        ["created_ip"]=>
        string(9) "127.0.0.1"
        ["modified_by"]=>
        string(1) "1"
        ["modified_date"]=>
        string(19) "2017-05-02 15:42:24"
        ["modified_ip"]=>
        string(9) "127.0.0.1"
        ["approved_by"]=>
        NULL
        ["approved_date"]=>
        NULL
        ["approved_ip"]=>
        NULL
        ["submitted_by"]=>
        string(1) "1"
        ["submitted_date"]=>
        string(19) "2017-05-02 17:56:38"
        ["submitted_ip"]=>
        string(9) "127.0.0.1"
        ["commited"]=>
        string(1) "1"
        ["approval_status"]=>
        string(1) "3"
        ["active"]=>
        string(1) "1"
        ["deleted"]=>
        string(1) "0"
      }
      [2]=>
      array(41) {
        ["row_num"]=>
        string(1) "3"
        ["uid"]=>
        string(4) "6328"
        ["master_id"]=>
        string(3) "249"
        ["locale"]=>
        string(2) "en"
        ["ranking"]=>
        string(1) "6"
        ["display_date"]=>
        string(19) "2017-04-19 00:00:00"
        ["store"]=>
        string(3) "cwb"
        ["title"]=>
        string(28) "SOGO FRESHMART Grand Opening"
        ["event_period"]=>
        string(0) ""
        ["template"]=>
        string(1) "3"
        ["description"]=>
        string(0) ""
        ["pdf"]=>
        string(46) "/uploads/files/Pdf/e-book/b2fgrandopeningb.pdf"
        ["url_name"]=>
        string(15) "b2fgrandopening"
        ["happening"]=>
        string(1) "1"
        ["highlight"]=>
        string(1) "1"
        ["show_at_index"]=>
        string(1) "1"
        ["thumbnail"]=>
        string(80) "/uploads/images/mainsite/event%26promotion/thumbnail_image/b2fgrandopening_t.jpg"
        ["thumb_alt"]=>
        string(0) ""
        ["index_image"]=>
        string(75) "/uploads/images/mainsite/event%26promotion/b2fgrandopening_event_promot.jpg"
        ["index_alt"]=>
        string(0) ""
        ["link"]=>
        string(0) ""
        ["popup_type"]=>
        string(1) "1"
        ["happening_end_date"]=>
        string(19) "2017-05-10 00:00:00"
        ["extracted_pdf"]=>
        string(1) "0"
        ["version"]=>
        string(1) "4"
        ["created_by"]=>
        string(1) "1"
        ["created_date"]=>
        string(19) "2017-04-19 16:38:44"
        ["created_ip"]=>
        string(9) "127.0.0.1"
        ["modified_by"]=>
        string(1) "1"
        ["modified_date"]=>
        string(19) "2017-04-28 13:54:58"
        ["modified_ip"]=>
        string(9) "127.0.0.1"
        ["approved_by"]=>
        NULL
        ["approved_date"]=>
        NULL
        ["approved_ip"]=>
        NULL
        ["submitted_by"]=>
        string(1) "1"
        ["submitted_date"]=>
        string(19) "2017-04-28 13:55:34"
        ["submitted_ip"]=>
        string(9) "127.0.0.1"
        ["commited"]=>
        string(1) "1"
        ["approval_status"]=>
        string(1) "3"
        ["active"]=>
        string(1) "1"
        ["deleted"]=>
        string(1) "0"
      }
      [3]=>
      array(41) {
        ["row_num"]=>
        string(1) "4"
        ["uid"]=>
        string(4) "6439"
        ["master_id"]=>
        string(1) "3"
        ["locale"]=>
        string(2) "en"
        ["ranking"]=>
        string(1) "7"
        ["display_date"]=>
        string(19) "2017-05-22 00:00:00"
        ["store"]=>
        string(3) "cwb"
        ["title"]=>
        string(64) "B2/F Freshmart A Taste of Japanese Delicacies & Tuen Ng Festival"
        ["event_period"]=>
        string(13) "22/5-6/6/2017"
        ["template"]=>
        string(1) "1"
        ["description"]=>
        string(0) ""
        ["pdf"]=>
        string(45) "/uploads/files/Pdf/e-book/b2cnyhpbl20171_.pdf"
        ["url_name"]=>
        string(14) "b2cnyhpbl20171"
        ["happening"]=>
        string(1) "1"
        ["highlight"]=>
        string(1) "1"
        ["show_at_index"]=>
        string(1) "1"
        ["thumbnail"]=>
        string(86) "/uploads/images/mainsite/event%26promotion/original_image/2017522/cwb_sogonews_b2s.jpg"
        ["thumb_alt"]=>
        string(14) "B2/F Food Fair"
        ["index_image"]=>
        string(56) "/uploads/images/mainsite/event%26promotion/eventImg3.jpg"
        ["index_alt"]=>
        string(14) "B2/F Food Fair"
        ["link"]=>
        string(68) "http://www.sogo.com.hk/cwb/en/thankfulweek/site/index.php?section=26"
        ["popup_type"]=>
        string(1) "1"
        ["happening_end_date"]=>
        string(19) "2017-06-06 00:00:00"
        ["extracted_pdf"]=>
        string(1) "0"
        ["version"]=>
        string(3) "161"
        ["created_by"]=>
        string(1) "1"
        ["created_date"]=>
        string(19) "2014-05-07 14:58:11"
        ["created_ip"]=>
        string(9) "127.0.0.1"
        ["modified_by"]=>
        string(1) "1"
        ["modified_date"]=>
        string(19) "2017-05-19 17:11:50"
        ["modified_ip"]=>
        string(9) "127.0.0.1"
        ["approved_by"]=>
        NULL
        ["approved_date"]=>
        NULL
        ["approved_ip"]=>
        NULL
        ["submitted_by"]=>
        string(1) "1"
        ["submitted_date"]=>
        string(19) "2017-05-19 17:14:34"
        ["submitted_ip"]=>
        string(9) "127.0.0.1"
        ["commited"]=>
        string(1) "1"
        ["approval_status"]=>
        string(1) "3"
        ["active"]=>
        string(1) "1"
        ["deleted"]=>
        string(1) "0"
      }
    }
  }
  ["sql"]=>
  string(846) "
				SELECT * FROM (
					
				SELECT
					@row:=@row+1 as row_num, promotion.*
				FROM ms_promotion_master promotion
				INNER JOIN (
					SELECT master_id, max(version) currentVersion, commited FROM ms_promotion_master
					WHERE commited = 1
					GROUP BY master_id
				) versioning ON
					versioning.master_id = promotion.master_id
					AND versioning.currentVersion = promotion.version
				INNER JOIN (select @row:=0)r 
				WHERE 
					promotion.locale = :LOCALE AND 
					promotion.active = 1 AND 
					promotion.deleted = 0 
					AND promotion.store = :store AND 
					promotion.display_date <= NOW() AND 
					highlight = :HIGHLIGHT AND 
					template <> :TEMPLATE
				 ORDER BY ranking ASC, display_date DESC
			
				) RS
				WHERE row_num BETWEEN :START_RECORD AND :END_RECORD 
				ORDER BY row_num ASC 
			"
  ["dbParam"]=>
  array(6) {
    [0]=>
    array(2) {
      ["name"]=>
      string(7) ":LOCALE"
      ["value"]=>
      string(2) "en"
    }
    [1]=>
    array(2) {
      ["name"]=>
      string(6) ":store"
      ["value"]=>
      string(3) "cwb"
    }
    [2]=>
    array(2) {
      ["name"]=>
      string(10) ":HIGHLIGHT"
      ["value"]=>
      int(1)
    }
    [3]=>
    array(2) {
      ["name"]=>
      string(9) ":TEMPLATE"
      ["value"]=>
      int(4)
    }
    [4]=>
    array(2) {
      ["name"]=>
      string(13) ":START_RECORD"
      ["value"]=>
      int(1)
    }
    [5]=>
    array(2) {
      ["name"]=>
      string(11) ":END_RECORD"
      ["value"]=>
      int(4)
    }
  }
}
SOGO