array(4) {
  ["result"]=>
  string(10) "SQL error!"
  ["query"]=>
  string(249) "
                SELECT * FROM ins_clinic_to_networks 
                WHERE
                    clinic_id =  AND 
                    start_datetime <= '2022-10-04 16:42:22' AND 
                    end_datetime > '2022-10-04 16:42:22'
            "
  ["dbError"]=>
  string(232) "1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND 
                    start_datetime <= '2022-10-04 16:42:22' AND 
          ' at line 3"
  ["PDOException"]=>
  array(4) {
    ["message"]=>
    string(282) "SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND 
                    start_datetime <= '2022-10-04 16:42:22' AND 
          ' at line 3"
    ["code"]=>
    string(5) "42000"
    ["fileLine"]=>
    string(87) "/usr/local/www/apache24/data/projects/piearsta2015/system/lib/db/db.class.php Line: 343"
    ["trace"]=>
    array(8) {
      [0]=>
      array(6) {
        ["file"]=>
        string(77) "/usr/local/www/apache24/data/projects/piearsta2015/system/lib/db/db.class.php"
        ["line"]=>
        int(343)
        ["function"]=>
        string(7) "execute"
        ["class"]=>
        string(12) "PDOStatement"
        ["type"]=>
        string(2) "->"
        ["args"]=>
        array(0) {
        }
      }
      [1]=>
      array(6) {
        ["file"]=>
        string(95) "/usr/local/www/apache24/data/projects/piearsta2015/system/app/out/clinics/inc/clinics.class.php"
        ["line"]=>
        int(509)
        ["function"]=>
        string(5) "query"
        ["class"]=>
        string(5) "query"
        ["type"]=>
        string(2) "->"
        ["args"]=>
        array(2) {
          [0]=>
          &object(Db)#5 (5) {
            ["connect_id"]=>
            NULL
            ["type"]=>
            string(0) ""
            ["query_id"]=>
            array(237) {
              [0]=>
              bool(true)
              [1]=>
              bool(true)
              [2]=>
              bool(true)
              [3]=>
              bool(true)
              [4]=>
              bool(true)
              [5]=>
              bool(true)
              [6]=>
              bool(true)
              [7]=>
              bool(true)
              [8]=>
              bool(true)
              [9]=>
              bool(true)
              [10]=>
              bool(true)
              [11]=>
              bool(true)
              [12]=>
              bool(true)
              [13]=>
              bool(true)
              [14]=>
              bool(true)
              [15]=>
              bool(true)
              [16]=>
              bool(true)
              [17]=>
              bool(true)
              [18]=>
              bool(true)
              [19]=>
              bool(true)
              [20]=>
              bool(true)
              [21]=>
              bool(true)
              [22]=>
              bool(true)
              [23]=>
              bool(true)
              [24]=>
              bool(true)
              [25]=>
              bool(true)
              [26]=>
              bool(true)
              [27]=>
              bool(true)
              [28]=>
              bool(true)
              [29]=>
              bool(true)
              [30]=>
              bool(true)
              [31]=>
              bool(true)
              [32]=>
              bool(true)
              [33]=>
              bool(true)
              [34]=>
              bool(true)
              [35]=>
              bool(true)
              [36]=>
              bool(true)
              [37]=>
              bool(true)
              [38]=>
              bool(true)
              [39]=>
              bool(true)
              [40]=>
              bool(true)
              [41]=>
              bool(true)
              [42]=>
              bool(true)
              [43]=>
              bool(true)
              [44]=>
              bool(true)
              [45]=>
              bool(true)
              [46]=>
              bool(true)
              [47]=>
              bool(true)
              [48]=>
              bool(true)
              [49]=>
              bool(true)
              [50]=>
              bool(true)
              [51]=>
              bool(true)
              [52]=>
              bool(true)
              [53]=>
              bool(true)
              [54]=>
              bool(true)
              [55]=>
              bool(true)
              [56]=>
              bool(true)
              [57]=>
              bool(true)
              [58]=>
              bool(true)
              [59]=>
              bool(true)
              [60]=>
              bool(true)
              [61]=>
              bool(true)
              [62]=>
              bool(true)
              [63]=>
              bool(true)
              [64]=>
              bool(true)
              [65]=>
              bool(true)
              [66]=>
              bool(true)
              [67]=>
              bool(true)
              [68]=>
              bool(true)
              [69]=>
              bool(true)
              [70]=>
              bool(true)
              [71]=>
              bool(true)
              [72]=>
              bool(true)
              [73]=>
              bool(true)
              [74]=>
              bool(true)
              [75]=>
              bool(true)
              [76]=>
              bool(true)
              [77]=>
              bool(true)
              [78]=>
              bool(true)
              [79]=>
              bool(true)
              [80]=>
              bool(true)
              [81]=>
              bool(true)
              [82]=>
              bool(true)
              [83]=>
              bool(true)
              [84]=>
              bool(true)
              [85]=>
              bool(true)
              [86]=>
              bool(true)
              [87]=>
              bool(true)
              [88]=>
              bool(true)
              [89]=>
              bool(true)
              [90]=>
              bool(true)
              [91]=>
              bool(true)
              [92]=>
              bool(true)
              [93]=>
              bool(true)
              [94]=>
              bool(true)
              [95]=>
              bool(true)
              [96]=>
              bool(true)
              [97]=>
              bool(true)
              [98]=>
              bool(true)
              [99]=>
              bool(true)
              [100]=>
              bool(true)
              [101]=>
              bool(true)
              [102]=>
              bool(true)
              [103]=>
              bool(true)
              [104]=>
              bool(true)
              [105]=>
              bool(true)
              [106]=>
              bool(true)
              [107]=>
              bool(true)
              [108]=>
              bool(true)
              [109]=>
              bool(true)
              [110]=>
              bool(true)
              [111]=>
              bool(true)
              [112]=>
              bool(true)
              [113]=>
              bool(true)
              [114]=>
              bool(true)
              [115]=>
              bool(true)
              [116]=>
              bool(true)
              [117]=>
              bool(true)
              [118]=>
              bool(true)
              [119]=>
              bool(true)
              [120]=>
              bool(true)
              [121]=>
              bool(true)
              [122]=>
              bool(true)
              [123]=>
              bool(true)
              [124]=>
              bool(true)
              [125]=>
              bool(true)
              [126]=>
              bool(true)
              [127]=>
              bool(true)
              [128]=>
              bool(true)
              [129]=>
              bool(true)
              [130]=>
              bool(true)
              [131]=>
              bool(true)
              [132]=>
              bool(true)
              [133]=>
              bool(true)
              [134]=>
              bool(true)
              [135]=>
              bool(true)
              [136]=>
              bool(true)
              [137]=>
              bool(true)
              [138]=>
              bool(true)
              [139]=>
              bool(true)
              [140]=>
              bool(true)
              [141]=>
              bool(true)
              [142]=>
              bool(true)
              [143]=>
              bool(true)
              [144]=>
              bool(true)
              [145]=>
              bool(true)
              [146]=>
              bool(true)
              [147]=>
              bool(true)
              [148]=>
              bool(true)
              [149]=>
              bool(true)
              [150]=>
              bool(true)
              [151]=>
              bool(true)
              [152]=>
              bool(true)
              [153]=>
              bool(true)
              [154]=>
              bool(true)
              [155]=>
              bool(true)
              [156]=>
              bool(true)
              [157]=>
              bool(true)
              [158]=>
              bool(true)
              [159]=>
              bool(true)
              [160]=>
              bool(true)
              [161]=>
              bool(true)
              [162]=>
              bool(true)
              [163]=>
              bool(true)
              [164]=>
              bool(true)
              [165]=>
              bool(true)
              [166]=>
              bool(true)
              [167]=>
              bool(true)
              [168]=>
              bool(true)
              [169]=>
              bool(true)
              [170]=>
              bool(true)
              [171]=>
              bool(true)
              [172]=>
              bool(true)
              [173]=>
              bool(true)
              [174]=>
              bool(true)
              [175]=>
              bool(true)
              [176]=>
              bool(true)
              [177]=>
              bool(true)
              [178]=>
              bool(true)
              [179]=>
              bool(true)
              [180]=>
              bool(true)
              [181]=>
              bool(true)
              [182]=>
              bool(true)
              [183]=>
              bool(true)
              [184]=>
              bool(true)
              [185]=>
              bool(true)
              [186]=>
              bool(true)
              [187]=>
              bool(true)
              [188]=>
              bool(true)
              [189]=>
              bool(true)
              [190]=>
              bool(true)
              [191]=>
              bool(true)
              [192]=>
              bool(true)
              [193]=>
              bool(true)
              [194]=>
              bool(true)
              [195]=>
              bool(true)
              [196]=>
              bool(true)
              [197]=>
              bool(true)
              [198]=>
              bool(true)
              [199]=>
              bool(true)
              [200]=>
              bool(true)
              [201]=>
              bool(true)
              [202]=>
              bool(true)
              [203]=>
              bool(true)
              [204]=>
              bool(true)
              [205]=>
              bool(true)
              [206]=>
              bool(true)
              [207]=>
              bool(true)
              [208]=>
              bool(true)
              [209]=>
              bool(true)
              [210]=>
              bool(true)
              [211]=>
              bool(true)
              [212]=>
              bool(true)
              [213]=>
              bool(true)
              [214]=>
              bool(true)
              [215]=>
              bool(true)
              [216]=>
              bool(true)
              [217]=>
              bool(true)
              [218]=>
              bool(true)
              [219]=>
              bool(true)
              [220]=>
              bool(true)
              [221]=>
              bool(true)
              [222]=>
              bool(true)
              [223]=>
              bool(true)
              [224]=>
              bool(true)
              [225]=>
              bool(true)
              [226]=>
              bool(true)
              [227]=>
              bool(true)
              [228]=>
              bool(true)
              [229]=>
              bool(true)
              [230]=>
              bool(true)
              [231]=>
              bool(true)
              [232]=>
              bool(true)
              [233]=>
              bool(true)
              [234]=>
              bool(true)
              [235]=>
              bool(true)
              [236]=>
              bool(true)
            }
            ["queries"]=>
            array(237) {
              [0]=>
              string(16) "SET NAMES 'utf8'"
              [1]=>
              string(48) "SELECT lang FROM ad_languages WHERE `enable` = 1"
              [2]=>
              string(104) "SELECT `country_id` FROM `ad_countries_domains` WHERE `domain` = 'piearsta.lv' ORDER BY `id` ASC LIMIT 1"
              [3]=>
              string(151) "SELECT `lang` FROM `ad_languages` l, `ad_languages_to_ct` lc
						WHERE lc.lang_id = l.id
								AND lc.country_id = '1'
								AND lc.default = '1'"
              [4]=>
              string(67) "SELECT `id`
									FROM `mod_doctors`
									WHERE `url` = 'lv'"
              [5]=>
              string(67) "SELECT `id`
									FROM `mod_clinics`
									WHERE `url` = 'lv'"
              [6]=>
              string(81) "SELECT `id`
									FROM `mod_doctors`
									WHERE `url` = 'iestazu-katalogs'"
              [7]=>
              string(81) "SELECT `id`
									FROM `mod_clinics`
									WHERE `url` = 'iestazu-katalogs'"
              [8]=>
              string(80) "SELECT `id`
									FROM `mod_doctors`
									WHERE `url` = 'vca-atta-centrs'"
              [9]=>
              string(80) "SELECT `id`
									FROM `mod_clinics`
									WHERE `url` = 'vca-atta-centrs'"
              [10]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [11]=>
              string(185) "
			SELECT sd.`name` name, sd.`mlang` mlang, sdv.`lang`, sdv.`value` value, sd.mcountry, sdv.country 
			FROM `ad_sitedata` sd, `ad_sitedata_values` sdv 
			WHERE sd.`id` = sdv.`fid`
		"
              [12]=>
              string(69) "SELECT `id` FROM `ad_modules` WHERE name = 'iestazu-katalogs' LIMIT 1"
              [13]=>
              string(67) "SELECT `name`, `id` FROM `ad_modules` WHERE `default` = '1' LIMIT 1"
              [14]=>
              string(185) "
			SELECT sd.`name` name, sd.`mlang` mlang, sdv.`lang`, sdv.`value` value, sd.mcountry, sdv.country 
			FROM `ad_sitedata` sd, `ad_sitedata_values` sdv 
			WHERE sd.`id` = sdv.`fid`
		"
              [15]=>
              string(185) "
			SELECT sd.`name` name, sd.`mlang` mlang, sdv.`lang`, sdv.`value` value, sd.mcountry, sdv.country 
			FROM `ad_sitedata` sd, `ad_sitedata_values` sdv 
			WHERE sd.`id` = sdv.`fid`
		"
              [16]=>
              string(595) "SELECT content.*
									FROM
										`ad_countries_domains` domains,
										`ad_content` content,
										`ad_languages` lang,
										`ad_languages_to_ct` lc,
										`ad_templates` tpl
									WHERE 1
										AND domains.`domain` = 'piearsta.lv'
										AND content.`active` = '1'
										AND content.`country` = domains.`country_id`
										AND content.`url` = 'lv/iestazu-katalogs/'
										AND lang.`enable` = '1'
										AND lang.`lang` = content.`lang`
										AND lc.`lang_id` = lang.`id`
										AND lc.`country_id` = domains.`country_id`
								  LIMIT 1"
              [17]=>
              string(65) "SELECT `filename` FROM `ad_templates` WHERE `id` = '12' LIMIT 0,1"
              [18]=>
              string(69) "SELECT `id`, `parent_id` FROM ad_content WHERE `id` = '266' LIMIT 0,1"
              [19]=>
              string(69) "SELECT `id`, `parent_id` FROM ad_content WHERE `id` = '342' LIMIT 0,1"
              [20]=>
              string(114) "SELECT `id`, `url`, `lang`, `country`, `mirror_id` 
						FROM `ad_content` 
						WHERE 
							`mirror_id` <> ''"
              [21]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [22]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [23]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [24]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [25]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [26]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [27]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [28]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [29]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [30]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [31]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [32]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [33]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [34]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [35]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [36]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [37]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [38]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [39]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [40]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [41]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [42]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [43]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [44]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [45]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [46]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [47]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [48]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [49]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [50]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [51]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [52]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [53]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [54]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [55]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [56]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [57]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [58]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [59]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [60]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [61]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [62]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [63]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [64]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [65]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [66]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [67]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [68]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [69]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [70]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [71]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [72]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [73]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [74]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [75]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [76]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [77]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [78]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [79]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [80]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [81]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [82]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [83]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [84]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [85]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [86]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [87]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [88]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [89]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [90]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [91]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [92]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [93]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [94]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [95]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [96]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [97]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [98]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [99]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [100]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [101]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [102]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'ru' LIMIT 0,1"
              [103]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [104]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [105]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [106]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [107]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [108]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [109]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [110]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [111]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [112]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [113]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [114]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [115]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [116]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [117]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [118]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [119]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [120]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [121]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [122]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [123]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [124]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [125]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [126]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [127]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [128]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [129]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [130]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [131]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [132]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [133]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [134]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [135]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [136]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [137]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [138]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [139]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [140]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [141]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [142]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'en' LIMIT 0,1"
              [143]=>
              string(253) "
			SELECT `value`, `enable`, `name` 
			FROM `ad_messages` m, `ad_messages_info` mi 
			WHERE 1
				
				AND ((m.type = 'l' AND mi.country = 0) OR (mi.country = '1' AND m.type = 'c')) 
				AND m.id = mi.id 
				AND ((mi.lang = 'lv' AND mi.value <> ''))"
              [144]=>
              string(434) "SELECT c.`id`, c.`parent_id`, c.`title`, c.`url`, m.`id` AS menu_id, m.`name`, m.`expanded`
						FROM `ad_content` c, `ad_menus` m, `ad_menus_on_page` mp
						WHERE mp.`menu_id` = m.id
								AND mp.page_id = c.id
								AND c.`lang` = 'lv'
								AND c.`enable` = '1'
								AND c.`active` = '1'
								AND c.`country` = '1'
								
								AND m.enable = '1'
								AND m.parent_id = '0'
						ORDER BY m.name, c.`sort` ASC"
              [145]=>
              string(104) "SELECT `country_id` FROM `ad_countries_domains` WHERE `domain` = 'piearsta.lv' ORDER BY `id` ASC LIMIT 1"
              [146]=>
              string(87) "SELECT `main_id` FROM `ad_languages_to_ct` WHERE `default` = '1' AND `country_id` = '1'"
              [147]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [148]=>
              string(460) "SELECT c.`id`, c.`parent_id`, c.`title`, c.`url`, m.`id` AS menu_id, m.`name`, m.`expanded`
						FROM `ad_content` c, `ad_menus` m, `ad_menus_on_page` mp
						WHERE mp.`menu_id` = m.id
								AND mp.page_id = c.id
								AND c.`lang` = 'lv'
								AND c.`enable` = '1'
								AND c.`active` = '1'
								AND c.`country` = '1'
								 AND c.`parent_id` = '265'
								AND m.enable = '1'
								AND m.parent_id = '3'
						ORDER BY m.name, c.`sort` ASC"
              [149]=>
              string(104) "SELECT `country_id` FROM `ad_countries_domains` WHERE `domain` = 'piearsta.lv' ORDER BY `id` ASC LIMIT 1"
              [150]=>
              string(87) "SELECT `main_id` FROM `ad_languages_to_ct` WHERE `default` = '1' AND `country_id` = '1'"
              [151]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [152]=>
              string(460) "SELECT c.`id`, c.`parent_id`, c.`title`, c.`url`, m.`id` AS menu_id, m.`name`, m.`expanded`
						FROM `ad_content` c, `ad_menus` m, `ad_menus_on_page` mp
						WHERE mp.`menu_id` = m.id
								AND mp.page_id = c.id
								AND c.`lang` = 'lv'
								AND c.`enable` = '1'
								AND c.`active` = '1'
								AND c.`country` = '1'
								 AND c.`parent_id` = '266'
								AND m.enable = '1'
								AND m.parent_id = '3'
						ORDER BY m.name, c.`sort` ASC"
              [153]=>
              string(104) "SELECT `country_id` FROM `ad_countries_domains` WHERE `domain` = 'piearsta.lv' ORDER BY `id` ASC LIMIT 1"
              [154]=>
              string(87) "SELECT `main_id` FROM `ad_languages_to_ct` WHERE `default` = '1' AND `country_id` = '1'"
              [155]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [156]=>
              string(460) "SELECT c.`id`, c.`parent_id`, c.`title`, c.`url`, m.`id` AS menu_id, m.`name`, m.`expanded`
						FROM `ad_content` c, `ad_menus` m, `ad_menus_on_page` mp
						WHERE mp.`menu_id` = m.id
								AND mp.page_id = c.id
								AND c.`lang` = 'lv'
								AND c.`enable` = '1'
								AND c.`active` = '1'
								AND c.`country` = '1'
								 AND c.`parent_id` = '267'
								AND m.enable = '1'
								AND m.parent_id = '3'
						ORDER BY m.name, c.`sort` ASC"
              [157]=>
              string(104) "SELECT `country_id` FROM `ad_countries_domains` WHERE `domain` = 'piearsta.lv' ORDER BY `id` ASC LIMIT 1"
              [158]=>
              string(87) "SELECT `main_id` FROM `ad_languages_to_ct` WHERE `default` = '1' AND `country_id` = '1'"
              [159]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [160]=>
              string(460) "SELECT c.`id`, c.`parent_id`, c.`title`, c.`url`, m.`id` AS menu_id, m.`name`, m.`expanded`
						FROM `ad_content` c, `ad_menus` m, `ad_menus_on_page` mp
						WHERE mp.`menu_id` = m.id
								AND mp.page_id = c.id
								AND c.`lang` = 'lv'
								AND c.`enable` = '1'
								AND c.`active` = '1'
								AND c.`country` = '1'
								 AND c.`parent_id` = '268'
								AND m.enable = '1'
								AND m.parent_id = '3'
						ORDER BY m.name, c.`sort` ASC"
              [161]=>
              string(104) "SELECT `country_id` FROM `ad_countries_domains` WHERE `domain` = 'piearsta.lv' ORDER BY `id` ASC LIMIT 1"
              [162]=>
              string(87) "SELECT `main_id` FROM `ad_languages_to_ct` WHERE `default` = '1' AND `country_id` = '1'"
              [163]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [164]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [165]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [166]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [167]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [168]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [169]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [170]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [171]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [172]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [173]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [174]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [175]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [176]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [177]=>
              string(460) "SELECT c.`id`, c.`parent_id`, c.`title`, c.`url`, m.`id` AS menu_id, m.`name`, m.`expanded`
						FROM `ad_content` c, `ad_menus` m, `ad_menus_on_page` mp
						WHERE mp.`menu_id` = m.id
								AND mp.page_id = c.id
								AND c.`lang` = 'lv'
								AND c.`enable` = '1'
								AND c.`active` = '1'
								AND c.`country` = '1'
								 AND c.`parent_id` = '265'
								AND m.enable = '1'
								AND m.parent_id = '1'
						ORDER BY m.name, c.`sort` ASC"
              [178]=>
              string(104) "SELECT `country_id` FROM `ad_countries_domains` WHERE `domain` = 'piearsta.lv' ORDER BY `id` ASC LIMIT 1"
              [179]=>
              string(87) "SELECT `main_id` FROM `ad_languages_to_ct` WHERE `default` = '1' AND `country_id` = '1'"
              [180]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [181]=>
              string(460) "SELECT c.`id`, c.`parent_id`, c.`title`, c.`url`, m.`id` AS menu_id, m.`name`, m.`expanded`
						FROM `ad_content` c, `ad_menus` m, `ad_menus_on_page` mp
						WHERE mp.`menu_id` = m.id
								AND mp.page_id = c.id
								AND c.`lang` = 'lv'
								AND c.`enable` = '1'
								AND c.`active` = '1'
								AND c.`country` = '1'
								 AND c.`parent_id` = '266'
								AND m.enable = '1'
								AND m.parent_id = '1'
						ORDER BY m.name, c.`sort` ASC"
              [182]=>
              string(104) "SELECT `country_id` FROM `ad_countries_domains` WHERE `domain` = 'piearsta.lv' ORDER BY `id` ASC LIMIT 1"
              [183]=>
              string(87) "SELECT `main_id` FROM `ad_languages_to_ct` WHERE `default` = '1' AND `country_id` = '1'"
              [184]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [185]=>
              string(460) "SELECT c.`id`, c.`parent_id`, c.`title`, c.`url`, m.`id` AS menu_id, m.`name`, m.`expanded`
						FROM `ad_content` c, `ad_menus` m, `ad_menus_on_page` mp
						WHERE mp.`menu_id` = m.id
								AND mp.page_id = c.id
								AND c.`lang` = 'lv'
								AND c.`enable` = '1'
								AND c.`active` = '1'
								AND c.`country` = '1'
								 AND c.`parent_id` = '343'
								AND m.enable = '1'
								AND m.parent_id = '1'
						ORDER BY m.name, c.`sort` ASC"
              [186]=>
              string(104) "SELECT `country_id` FROM `ad_countries_domains` WHERE `domain` = 'piearsta.lv' ORDER BY `id` ASC LIMIT 1"
              [187]=>
              string(87) "SELECT `main_id` FROM `ad_languages_to_ct` WHERE `default` = '1' AND `country_id` = '1'"
              [188]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [189]=>
              string(460) "SELECT c.`id`, c.`parent_id`, c.`title`, c.`url`, m.`id` AS menu_id, m.`name`, m.`expanded`
						FROM `ad_content` c, `ad_menus` m, `ad_menus_on_page` mp
						WHERE mp.`menu_id` = m.id
								AND mp.page_id = c.id
								AND c.`lang` = 'lv'
								AND c.`enable` = '1'
								AND c.`active` = '1'
								AND c.`country` = '1'
								 AND c.`parent_id` = '267'
								AND m.enable = '1'
								AND m.parent_id = '1'
						ORDER BY m.name, c.`sort` ASC"
              [190]=>
              string(104) "SELECT `country_id` FROM `ad_countries_domains` WHERE `domain` = 'piearsta.lv' ORDER BY `id` ASC LIMIT 1"
              [191]=>
              string(87) "SELECT `main_id` FROM `ad_languages_to_ct` WHERE `default` = '1' AND `country_id` = '1'"
              [192]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [193]=>
              string(460) "SELECT c.`id`, c.`parent_id`, c.`title`, c.`url`, m.`id` AS menu_id, m.`name`, m.`expanded`
						FROM `ad_content` c, `ad_menus` m, `ad_menus_on_page` mp
						WHERE mp.`menu_id` = m.id
								AND mp.page_id = c.id
								AND c.`lang` = 'lv'
								AND c.`enable` = '1'
								AND c.`active` = '1'
								AND c.`country` = '1'
								 AND c.`parent_id` = '268'
								AND m.enable = '1'
								AND m.parent_id = '1'
						ORDER BY m.name, c.`sort` ASC"
              [194]=>
              string(104) "SELECT `country_id` FROM `ad_countries_domains` WHERE `domain` = 'piearsta.lv' ORDER BY `id` ASC LIMIT 1"
              [195]=>
              string(87) "SELECT `main_id` FROM `ad_languages_to_ct` WHERE `default` = '1' AND `country_id` = '1'"
              [196]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [197]=>
              string(460) "SELECT c.`id`, c.`parent_id`, c.`title`, c.`url`, m.`id` AS menu_id, m.`name`, m.`expanded`
						FROM `ad_content` c, `ad_menus` m, `ad_menus_on_page` mp
						WHERE mp.`menu_id` = m.id
								AND mp.page_id = c.id
								AND c.`lang` = 'lv'
								AND c.`enable` = '1'
								AND c.`active` = '1'
								AND c.`country` = '1'
								 AND c.`parent_id` = '289'
								AND m.enable = '1'
								AND m.parent_id = '1'
						ORDER BY m.name, c.`sort` ASC"
              [198]=>
              string(104) "SELECT `country_id` FROM `ad_countries_domains` WHERE `domain` = 'piearsta.lv' ORDER BY `id` ASC LIMIT 1"
              [199]=>
              string(87) "SELECT `main_id` FROM `ad_languages_to_ct` WHERE `default` = '1' AND `country_id` = '1'"
              [200]=>
              string(187) "SELECT c.*, cd.domain
							FROM
								`ad_countries` c, `ad_countries_domains` cd
							WHERE
								cd.`country_id` = c.id
								AND cd.`default` = '1'
							ORDER BY c.`id` ASC"
              [201]=>
              string(142) "SELECT * FROM `ad_languages` l, `ad_languages_to_ct` lc WHERE l.id = lc.lang_id AND lc.country_id = '1' AND l.enable = '1' ORDER BY l.sort ASC"
              [202]=>
              string(104) "SELECT `country_id` FROM `ad_countries_domains` WHERE `domain` = 'piearsta.lv' ORDER BY `id` ASC LIMIT 1"
              [203]=>
              string(87) "SELECT `main_id` FROM `ad_languages_to_ct` WHERE `default` = '1' AND `country_id` = '1'"
              [204]=>
              string(59) "SELECT `url` FROM `ad_content` WHERE `id` = '342' LIMIT 0,1"
              [205]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [206]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [207]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [208]=>
              string(93) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'vca-atta-centrs' LIMIT 0,1"
              [209]=>
              string(104) "SELECT `country_id` FROM `ad_countries_domains` WHERE `domain` = 'piearsta.lv' ORDER BY `id` ASC LIMIT 1"
              [210]=>
              string(87) "SELECT `main_id` FROM `ad_languages_to_ct` WHERE `default` = '1' AND `country_id` = '1'"
              [211]=>
              string(41) "SELECT * FROM ad_languages WHERE enable=1"
              [212]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [213]=>
              string(207) "SELECT * FROM `ad_modules` m
							LEFT JOIN `ad_modules_on_page` mop ON (m.`id` = mop.`module_id`)
						 	WHERE mop.`page_id` = '266' OR m.`all_pages` = 1
						 	GROUP BY m.id
						 	ORDER BY m.`id` ASC"
              [214]=>
              string(185) "
			SELECT sd.`name` name, sd.`mlang` mlang, sdv.`lang`, sdv.`value` value, sd.mcountry, sdv.country 
			FROM `ad_sitedata` sd, `ad_sitedata_values` sdv 
			WHERE sd.`id` = sdv.`fid`
		"
              [215]=>
              string(64) "SELECT `id` FROM `ad_modules` WHERE `name` = 'banners' LIMIT 0,1"
              [216]=>
              string(185) "
			SELECT sd.`name` name, sd.`mlang` mlang, sdv.`lang`, sdv.`value` value, sd.mcountry, sdv.country 
			FROM `ad_sitedata` sd, `ad_sitedata_values` sdv 
			WHERE sd.`id` = sdv.`fid`
		"
              [217]=>
              string(136) "SELECT *
							FROM `mod_banners`
							WHERE 1 
								AND `enabled` = '1' 
								AND `lang` = 'lv'
							ORDER BY `created` DESC"
              [218]=>
              string(185) "
			SELECT sd.`name` name, sd.`mlang` mlang, sdv.`lang`, sdv.`value` value, sd.mcountry, sdv.country 
			FROM `ad_sitedata` sd, `ad_sitedata_values` sdv 
			WHERE sd.`id` = sdv.`fid`
		"
              [219]=>
              string(64) "SELECT `id` FROM `ad_modules` WHERE `name` = 'profile' LIMIT 0,1"
              [220]=>
              string(185) "
			SELECT sd.`name` name, sd.`mlang` mlang, sdv.`lang`, sdv.`value` value, sd.mcountry, sdv.country 
			FROM `ad_sitedata` sd, `ad_sitedata_values` sdv 
			WHERE sd.`id` = sdv.`fid`
		"
              [221]=>
              string(65) "SELECT * FROM ad_content WHERE url LIKE '%profils/mans-profils/%'"
              [222]=>
              string(185) "
			SELECT sd.`name` name, sd.`mlang` mlang, sdv.`lang`, sdv.`value` value, sd.mcountry, sdv.country 
			FROM `ad_sitedata` sd, `ad_sitedata_values` sdv 
			WHERE sd.`id` = sdv.`fid`
		"
              [223]=>
              string(64) "SELECT `id` FROM `ad_modules` WHERE `name` = 'doctors' LIMIT 0,1"
              [224]=>
              string(185) "
			SELECT sd.`name` name, sd.`mlang` mlang, sdv.`lang`, sdv.`value` value, sd.mcountry, sdv.country 
			FROM `ad_sitedata` sd, `ad_sitedata_values` sdv 
			WHERE sd.`id` = sdv.`fid`
		"
              [225]=>
              string(244) "
SELECT DISTINCT d.id FROM `mod_doctors` AS d 

INNER JOIN `mod_doctors_to_clinics` AS d2c ON d.id = d2c.d_id AND ((d2c.c_id = 1542))
 INNER JOIN mod_clinics c ON (c.id = d2c.c_id AND c.enabled = 1) 




WHERE d.deleted = 0 AND d.enabled = 1  
"
              [226]=>
              string(315) "SELECT `d`.*
			    		FROM `mod_doctors_to_clinics` as `dtc`
			    			LEFT JOIN `mod_doctors` d ON (`d`.`id` = `dtc`.`d_id`)
			    		WHERE 1
			    			AND `dtc`.`c_id` = 1542
			    			AND `d`.`is_hidden_on_piearsta` = 0
			    			AND `d`.`enabled` = 1
							AND `d`.`deleted` = 0
			    		ORDER BY `d`.`id` DESC"
              [227]=>
              string(186) "SELECT dtc.*
							FROM `mod_doctors_to_clinics` dtc 
							LEFT JOIN mod_clinics c ON (c.id = dtc.c_id) 
							WHERE 1
							    AND c.enabled = 1 
								AND `dtc`.`c_id` = '1542'"
              [228]=>
              string(1611) "SELECT c.*, cd.title
							FROM `mod_classificators` c
								LEFT JOIN `mod_classificators_info` cd ON (c.id = cd.c_id)
							WHERE 1
								AND `c`.`enable` = '1'
								AND `cd`.`lang` = 'lv'
								AND c.type <> 5
								
								AND (
									EXISTS (SELECT 1 FROM `mod_doctors_to_classificators` cdd WHERE c.id = cdd.cl_id )
									OR
									EXISTS (SELECT 1 FROM `mod_clinics_to_classificators` cdd2 WHERE c.id = cdd2.cl_id)
									OR
									EXISTS (SELECT 1 FROM `mod_doctors_to_clinics` dtc
											LEFT JOIN `mod_clinics` clinics ON dtc.c_id = clinics.id
											WHERE clinics.enabled = 1 AND (c.id = clinics.city OR c.id = clinics.district) )
								) 
								UNION
                                SELECT cl.*, cli.title FROM mod_classificators cl
                                LEFT JOIN mod_classificators_info cli ON(cli.c_id = cl.id)
                                LEFT JOIN mod_clinics_to_classificators c2cl ON(c2cl.cl_id = cl.id)
                                LEFT JOIN mod_clinics c ON(c.id = c2cl.clinic_id)
                                LEFT JOIN mod_doctors_to_clinics d2c ON(c.id = d2c.c_id)
                                LEFT OUTER JOIN mod_doctors d ON(d.id = d2c.d_id) 
                                WHERE
                                    c.enabled = 1 AND
                                    d.enabled = 1 AND 
                                    d.deleted = 0 AND 
                                    cl.enable = 1 AND 
                                    cl.type = 5
                                GROUP BY cl.id
							ORDER BY type, title ASC"
              [229]=>
              string(567) "
                SELECT DISTINCT(dtcl.cl_id) 
                FROM `mod_clinics` c 
                LEFT JOIN `mod_doctors_to_clinics` dtc ON (c.id = dtc.c_id AND c.id = 1542) 
                LEFT JOIN `mod_doctors_to_classificators` dtcl ON (dtc.d_id = dtcl.d_id) 
                LEFT JOIN `mod_doctors` d ON(dtcl.d_id = d.id) 
                WHERE 
                    c.enabled = 1 AND 
                    d.deleted = 0 AND 
                    d.is_hidden_on_piearsta = 0 AND 
                    d.id IS NOT NULL 
                    AND `dtcl`.`cl_type` = 3"
              [230]=>
              string(546) "
                SELECT DISTINCT(dtcl.cl_id) 
                FROM `mod_clinics` c 
                LEFT JOIN `mod_doctors_to_clinics` dtc ON (c.id = dtc.c_id AND c.id = 1542) 
                LEFT JOIN `mod_doctors_to_classificators` dtcl ON (dtc.d_id = dtcl.d_id) 
                LEFT JOIN `mod_doctors` d ON(dtcl.d_id = d.id) 
                WHERE 
                    c.enabled = 1 AND 
                    d.deleted = 0 AND 
                    d.is_hidden_on_piearsta = 0 AND 
                    d.id IS NOT NULL AND `dtcl`.`cl_type` = 4"
              [231]=>
              string(59) "SELECT `url` FROM `ad_content` WHERE `id` = '265' LIMIT 0,1"
              [232]=>
              string(80) "SELECT `id` FROM `ad_languages` WHERE `enable` = '1' AND `lang` = 'lv' LIMIT 0,1"
              [233]=>
              string(185) "
			SELECT sd.`name` name, sd.`mlang` mlang, sdv.`lang`, sdv.`value` value, sd.mcountry, sdv.country 
			FROM `ad_sitedata` sd, `ad_sitedata_values` sdv 
			WHERE sd.`id` = sdv.`fid`
		"
              [234]=>
              string(64) "SELECT `id` FROM `ad_modules` WHERE `name` = 'clinics' LIMIT 0,1"
              [235]=>
              string(185) "
			SELECT sd.`name` name, sd.`mlang` mlang, sdv.`lang`, sdv.`value` value, sd.mcountry, sdv.country 
			FROM `ad_sitedata` sd, `ad_sitedata_values` sdv 
			WHERE sd.`id` = sdv.`fid`
		"
              [236]=>
              string(742) "SELECT c.*, ci.*, c.id AS id, COUNT(`dtc`.`d_id`) as `doctor_count`, clicity.title AS citytitle, clidistrict.title AS districttitle
						FROM `mod_clinics` c
							LEFT JOIN `mod_clinics_info` AS ci ON
				    			ci.id = (SELECT ci1.id FROM `mod_clinics_info` AS ci1 WHERE c.id = ci1.clinic_id LIMIT 1)
		    				LEFT JOIN `mod_doctors_to_clinics` dtc ON (`dtc`.`c_id` = `c`.`id`)
		    				LEFT JOIN `mod_classificators_info` clicity ON (`clicity`.`c_id` = `c`.`city` AND `clicity`.`lang` = 'lv')
		    				LEFT JOIN `mod_classificators_info` clidistrict ON (`clidistrict`.`c_id` = `c`.`district` AND `clidistrict`.`lang` = 'lv')
		    			WHERE 1
		    			    AND c.enabled = 1
		    			    AND ci.lang = 'lv' 
							AND `c`.`id` = '1542'"
            }
            ["qTimes"]=>
            array(237) {
              [0]=>
              string(6) "0.0005"
              [1]=>
              string(6) "0.0002"
              [2]=>
              string(6) "0.0001"
              [3]=>
              string(6) "0.0001"
              [4]=>
              string(6) "0.0012"
              [5]=>
              string(6) "0.0002"
              [6]=>
              string(6) "0.0012"
              [7]=>
              string(6) "0.0002"
              [8]=>
              string(6) "0.0012"
              [9]=>
              string(6) "0.0002"
              [10]=>
              string(6) "0.0001"
              [11]=>
              string(6) "0.0017"
              [12]=>
              string(6) "0.0001"
              [13]=>
              string(6) "0.0001"
              [14]=>
              string(6) "0.0014"
              [15]=>
              string(6) "0.0015"
              [16]=>
              string(6) "0.0003"
              [17]=>
              string(6) "0.0001"
              [18]=>
              string(6) "0.0001"
              [19]=>
              string(6) "0.0001"
              [20]=>
              string(6) "0.0003"
              [21]=>
              string(6) "0.0001"
              [22]=>
              string(6) "0.0001"
              [23]=>
              string(6) "0.0001"
              [24]=>
              string(6) "0.0001"
              [25]=>
              string(6) "0.0001"
              [26]=>
              string(6) "0.0001"
              [27]=>
              string(6) "0.0001"
              [28]=>
              string(6) "0.0001"
              [29]=>
              string(6) "0.0001"
              [30]=>
              string(6) "0.0001"
              [31]=>
              string(6) "0.0001"
              [32]=>
              string(6) "0.0001"
              [33]=>
              string(6) "0.0001"
              [34]=>
              string(6) "0.0001"
              [35]=>
              string(6) "0.0001"
              [36]=>
              string(6) "0.0001"
              [37]=>
              string(6) "0.0001"
              [38]=>
              string(6) "0.0001"
              [39]=>
              string(6) "0.0001"
              [40]=>
              string(6) "0.0001"
              [41]=>
              string(6) "0.0001"
              [42]=>
              string(6) "0.0001"
              [43]=>
              string(6) "0.0001"
              [44]=>
              string(6) "0.0001"
              [45]=>
              string(6) "0.0001"
              [46]=>
              string(6) "0.0001"
              [47]=>
              string(6) "0.0001"
              [48]=>
              string(6) "0.0001"
              [49]=>
              string(6) "0.0001"
              [50]=>
              string(6) "0.0001"
              [51]=>
              string(6) "0.0001"
              [52]=>
              string(6) "0.0001"
              [53]=>
              string(6) "0.0001"
              [54]=>
              string(6) "0.0001"
              [55]=>
              string(6) "0.0001"
              [56]=>
              string(6) "0.0001"
              [57]=>
              string(6) "0.0001"
              [58]=>
              string(6) "0.0001"
              [59]=>
              string(6) "0.0001"
              [60]=>
              string(6) "0.0001"
              [61]=>
              string(6) "0.0001"
              [62]=>
              string(6) "0.0001"
              [63]=>
              string(6) "0.0001"
              [64]=>
              string(6) "0.0001"
              [65]=>
              string(6) "0.0001"
              [66]=>
              string(6) "0.0003"
              [67]=>
              string(6) "0.0001"
              [68]=>
              string(6) "0.0003"
              [69]=>
              string(6) "0.0002"
              [70]=>
              string(6) "0.0001"
              [71]=>
              string(6) "0.0001"
              [72]=>
              string(6) "0.0001"
              [73]=>
              string(6) "0.0001"
              [74]=>
              string(6) "0.0001"
              [75]=>
              string(6) "0.0001"
              [76]=>
              string(6) "0.0001"
              [77]=>
              string(6) "0.0001"
              [78]=>
              string(6) "0.0001"
              [79]=>
              string(6) "0.0001"
              [80]=>
              string(6) "0.0001"
              [81]=>
              string(6) "0.0001"
              [82]=>
              string(6) "0.0001"
              [83]=>
              string(6) "0.0001"
              [84]=>
              string(6) "0.0001"
              [85]=>
              string(6) "0.0001"
              [86]=>
              string(6) "0.0001"
              [87]=>
              string(6) "0.0001"
              [88]=>
              string(6) "0.0001"
              [89]=>
              string(6) "0.0001"
              [90]=>
              string(6) "0.0001"
              [91]=>
              string(6) "0.0001"
              [92]=>
              string(6) "0.0001"
              [93]=>
              string(6) "0.0001"
              [94]=>
              string(6) "0.0001"
              [95]=>
              string(6) "0.0001"
              [96]=>
              string(6) "0.0001"
              [97]=>
              string(6) "0.0001"
              [98]=>
              string(6) "0.0001"
              [99]=>
              string(6) "0.0001"
              [100]=>
              string(6) "0.0001"
              [101]=>
              string(6) "0.0001"
              [102]=>
              string(6) "0.0001"
              [103]=>
              string(6) "0.0001"
              [104]=>
              string(6) "0.0001"
              [105]=>
              string(6) "0.0001"
              [106]=>
              string(6) "0.0001"
              [107]=>
              string(6) "0.0001"
              [108]=>
              string(6) "0.0001"
              [109]=>
              string(6) "0.0001"
              [110]=>
              string(6) "0.0001"
              [111]=>
              string(6) "0.0001"
              [112]=>
              string(6) "0.0001"
              [113]=>
              string(6) "0.0001"
              [114]=>
              string(6) "0.0001"
              [115]=>
              string(6) "0.0001"
              [116]=>
              string(6) "0.0001"
              [117]=>
              string(6) "0.0001"
              [118]=>
              string(6) "0.0001"
              [119]=>
              string(6) "0.0001"
              [120]=>
              string(6) "0.0001"
              [121]=>
              string(6) "0.0001"
              [122]=>
              string(6) "0.0001"
              [123]=>
              string(6) "0.0001"
              [124]=>
              string(6) "0.0001"
              [125]=>
              string(6) "0.0001"
              [126]=>
              string(6) "0.0001"
              [127]=>
              string(6) "0.0001"
              [128]=>
              string(6) "0.0001"
              [129]=>
              string(6) "0.0001"
              [130]=>
              string(6) "0.0001"
              [131]=>
              string(6) "0.0001"
              [132]=>
              string(6) "0.0001"
              [133]=>
              string(6) "0.0001"
              [134]=>
              string(6) "0.0001"
              [135]=>
              string(6) "0.0001"
              [136]=>
              string(6) "0.0001"
              [137]=>
              string(6) "0.0001"
              [138]=>
              string(6) "0.0001"
              [139]=>
              string(6) "0.0001"
              [140]=>
              string(6) "0.0001"
              [141]=>
              string(6) "0.0001"
              [142]=>
              string(6) "0.0001"
              [143]=>
              string(6) "0.0025"
              [144]=>
              string(6) "0.0004"
              [145]=>
              string(6) "0.0001"
              [146]=>
              string(6) "0.0001"
              [147]=>
              string(6) "0.0001"
              [148]=>
              string(6) "0.0002"
              [149]=>
              string(6) "0.0001"
              [150]=>
              string(6) "0.0001"
              [151]=>
              string(6) "0.0001"
              [152]=>
              string(6) "0.0002"
              [153]=>
              string(6) "0.0001"
              [154]=>
              string(6) "0.0001"
              [155]=>
              string(6) "0.0001"
              [156]=>
              string(6) "0.0002"
              [157]=>
              string(6) "0.0001"
              [158]=>
              string(6) "0.0001"
              [159]=>
              string(6) "0.0001"
              [160]=>
              string(6) "0.0002"
              [161]=>
              string(6) "0.0001"
              [162]=>
              string(6) "0.0001"
              [163]=>
              string(6) "0.0001"
              [164]=>
              string(6) "0.0001"
              [165]=>
              string(6) "0.0001"
              [166]=>
              string(6) "0.0001"
              [167]=>
              string(6) "0.0001"
              [168]=>
              string(6) "0.0001"
              [169]=>
              string(6) "0.0001"
              [170]=>
              string(6) "0.0001"
              [171]=>
              string(6) "0.0001"
              [172]=>
              string(6) "0.0001"
              [173]=>
              string(6) "0.0001"
              [174]=>
              string(6) "0.0001"
              [175]=>
              string(6) "0.0001"
              [176]=>
              string(6) "0.0001"
              [177]=>
              string(6) "0.0002"
              [178]=>
              string(6) "0.0001"
              [179]=>
              string(6) "0.0001"
              [180]=>
              string(6) "0.0001"
              [181]=>
              string(6) "0.0002"
              [182]=>
              string(6) "0.0001"
              [183]=>
              string(6) "0.0001"
              [184]=>
              string(6) "0.0001"
              [185]=>
              string(6) "0.0002"
              [186]=>
              string(6) "0.0001"
              [187]=>
              string(6) "0.0001"
              [188]=>
              string(6) "0.0001"
              [189]=>
              string(6) "0.0002"
              [190]=>
              string(6) "0.0001"
              [191]=>
              string(6) "0.0001"
              [192]=>
              string(6) "0.0001"
              [193]=>
              string(6) "0.0003"
              [194]=>
              string(6) "0.0001"
              [195]=>
              string(6) "0.0001"
              [196]=>
              string(6) "0.0001"
              [197]=>
              string(6) "0.0002"
              [198]=>
              string(6) "0.0001"
              [199]=>
              string(6) "0.0001"
              [200]=>
              string(6) "0.0001"
              [201]=>
              string(6) "0.0002"
              [202]=>
              string(6) "0.0001"
              [203]=>
              string(6) "0.0001"
              [204]=>
              string(6) "0.0001"
              [205]=>
              string(6) "0.0001"
              [206]=>
              string(6) "0.0001"
              [207]=>
              string(6) "0.0001"
              [208]=>
              string(6) "0.0001"
              [209]=>
              string(6) "0.0001"
              [210]=>
              string(6) "0.0001"
              [211]=>
              string(6) "0.0001"
              [212]=>
              string(6) "0.0001"
              [213]=>
              string(6) "0.0002"
              [214]=>
              string(6) "0.0014"
              [215]=>
              string(6) "0.0001"
              [216]=>
              string(6) "0.0014"
              [217]=>
              string(6) "0.0002"
              [218]=>
              string(6) "0.0014"
              [219]=>
              string(6) "0.0001"
              [220]=>
              string(6) "0.0015"
              [221]=>
              string(6) "0.0004"
              [222]=>
              string(6) "0.0014"
              [223]=>
              string(6) "0.0001"
              [224]=>
              string(6) "0.0014"
              [225]=>
              string(6) "0.0002"
              [226]=>
              string(6) "0.0002"
              [227]=>
              string(6) "0.0001"
              [228]=>
              string(6) "0.0737"
              [229]=>
              string(6) "0.0002"
              [230]=>
              string(6) "0.0002"
              [231]=>
              string(6) "0.0001"
              [232]=>
              string(6) "0.0001"
              [233]=>
              string(6) "0.0018"
              [234]=>
              string(6) "0.0001"
              [235]=>
              string(6) "0.0018"
              [236]=>
              string(6) "0.0004"
            }
          }
          [1]=>
          &string(249) "
                SELECT * FROM ins_clinic_to_networks 
                WHERE
                    clinic_id =  AND 
                    start_datetime <= '2022-10-04 16:42:22' AND 
                    end_datetime > '2022-10-04 16:42:22'
            "
        }
      }
      [2]=>
      array(6) {
        ["file"]=>
        string(85) "/usr/local/www/apache24/data/projects/piearsta2015/system/app/out/clinics/clinics.php"
        ["line"]=>
        int(39)
        ["function"]=>
        string(7) "showOne"
        ["class"]=>
        string(11) "clinicsData"
        ["type"]=>
        string(2) "->"
        ["args"]=>
        array(0) {
        }
      }
      [3]=>
      array(6) {
        ["file"]=>
        string(85) "/usr/local/www/apache24/data/projects/piearsta2015/system/lib/module/module.class.php"
        ["line"]=>
        int(454)
        ["function"]=>
        string(3) "run"
        ["class"]=>
        string(7) "clinics"
        ["type"]=>
        string(2) "->"
        ["args"]=>
        array(0) {
        }
      }
      [4]=>
      array(6) {
        ["file"]=>
        string(85) "/usr/local/www/apache24/data/projects/piearsta2015/system/lib/module/module.class.php"
        ["line"]=>
        int(171)
        ["function"]=>
        string(16) "loadOtherModules"
        ["class"]=>
        string(6) "Module"
        ["type"]=>
        string(2) "->"
        ["args"]=>
        array(0) {
        }
      }
      [5]=>
      array(6) {
        ["file"]=>
        string(85) "/usr/local/www/apache24/data/projects/piearsta2015/system/lib/loader/loader.class.php"
        ["line"]=>
        int(40)
        ["function"]=>
        string(4) "load"
        ["class"]=>
        string(6) "Module"
        ["type"]=>
        string(2) "->"
        ["args"]=>
        array(0) {
        }
      }
      [6]=>
      array(6) {
        ["file"]=>
        string(78) "/usr/local/www/apache24/data/projects/piearsta2015/system/func/common.func.php"
        ["line"]=>
        int(111)
        ["function"]=>
        string(11) "__construct"
        ["class"]=>
        string(6) "Loader"
        ["type"]=>
        string(2) "->"
        ["args"]=>
        array(1) {
          [0]=>
          &string(0) ""
        }
      }
      [7]=>
      array(4) {
        ["file"]=>
        string(60) "/usr/local/www/apache24/data/projects/piearsta2015/index.php"
        ["line"]=>
        int(39)
        ["function"]=>
        string(12) "loadLibClass"
        ["args"]=>
        array(1) {
          [0]=>
          &string(6) "loader"
        }
      }
    }
  }
}