You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND active = 1
ORDER BY position' at line 4
SELECT *
FROM `cofiscz_productgalleries_image`
WHERE `id_gallery` =
AND active = 1
ORDER BY position;
at line 791 in file classes/db/Db.php
786. if ($webservice_call && $errno) {
787. $dbg = debug_backtrace();
788. WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
789. } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) {
790. if ($sql) {
791. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');
792. }
793.
794. throw new PrestaShopDatabaseException($this->getMsgError());
795. }
796. }
420. $this->result = $this->_query($sql);
421. }
422. }
423.
424. if (_PS_DEBUG_SQL_) {
425. $this->displayError($sql);
426. }
427.
428. return $this->result;
429. }
430.
Argument [0] SELECT * FROM `cofiscz_productgalleries_image` WHERE `id_gallery` = AND active = 1 ORDER BY position;
638. throw new PrestaShopDatabaseException('Db->executeS() must be used only with select, show, explain or describe queries');
639. }
640. return $this->execute($sql, $use_cache);
641. }
642.
643. $this->result = $this->query($sql);
644.
645. if (!$this->result) {
646. $result = false;
647. } else {
648. if (!$array) {
Argument [0] SELECT * FROM `cofiscz_productgalleries_image` WHERE `id_gallery` = AND active = 1 ORDER BY position;
1154. WHERE `id_product` = '.$params['varianta']);
1155.
1156. $images = Db::getInstance()->executeS('
1157. SELECT *
1158. FROM `' . self::TABLE_IMAGE . '`
1159. WHERE `id_gallery` = ' . $id_gallery[0]['id_cofiscz_productgallery'] . '
1160. AND active = 1
1161. ORDER BY position;
1162. ');
1163.
1164. if ($images && is_array($images)) {
Argument [0] SELECT * FROM `cofiscz_productgalleries_image` WHERE `id_gallery` = AND active = 1 ORDER BY position;
595. }
596. }
597.
598. // Immediately return the result if we do not log performances
599. if (!Module::$_log_modules_perfs) {
600. return $module->{$method}($params);
601. }
602.
603. // Store time and memory before and after hook call and save the result in the database
604. $time_start = microtime(true);
605. $memory_start = memory_get_usage(true);
Argument [0]
547. Tools::waitUntilFileIsModified($moduleInstance->push_filename, $moduleInstance->push_time_limit);
548. }
549.
550. // Call hook method
551. if ($hook_callable) {
552. $display = Hook::coreCallHook($moduleInstance, 'hook' . $hook_name, $hook_args);
553. } elseif ($hook_retro_callable) {
554. $display = Hook::coreCallHook($moduleInstance, 'hook' . $retro_hook_name, $hook_args);
555. }
556.
557. // Live edit
Argument [0] Argument [1] hookDisplayCMSGallery Argument [2]
198. return '';
199. }
200. unset($hook_params['mod']);
201. }
202. unset($hook_params['h']);
203. return Hook::exec($params['h'], $hook_params, $id_module);
204. }
205. }
206.
207. function smartyCleanHtml($data)
208. {
Argument [0] DisplayCMSGallery Argument [1] Argument [2]
261. } else {
262. $args[] = &$arguments[$a];
263. }
264. }
265.
266. return call_user_func_array($item, $args);
267. }
268. }
269.
270. public static function getInstance()
271. {
Argument [0] Array ( [h] => DisplayCMSGallery [varianta] => 2424 ) Argument [1]
Argument [0] smartyHook Argument [1]
183. }
184. array_unshift($_template->_capture_stack, array());
185. //
186. // render compiled template
187. //
188. $_template->properties['unifunc']($_template);
189. // any unclosed {capture} tags ?
190. if (isset($_template->_capture_stack[0][0])) {
191. $_template->capture_error();
192. }
193. array_shift($_template->_capture_stack);
Argument [0]
105. * {@inheritDoc}
106. */
107. public function fetch($template = null, $cache_id = null, $compile_id = null, $parent = null, $display = false, $merge_tpl_vars = true, $no_output_filter = false)
108. {
109. $this->check_compile_cache_invalidation();
110. return parent::fetch($template, $cache_id, $compile_id, $parent, $display, $merge_tpl_vars, $no_output_filter);
111. }
112.
113. /**
114. * {@inheritDoc}
115. */
Argument [0] /data/vhosts/judoliga.cz/kwon.judoliga.cz/themes/ekg-eshop/product.tpl Argument [1] Argument [2] Argument [3] Argument [4] Argument [5] 1 Argument [6]
708. ));
709.
710. $layout = $this->getLayout();
711. if ($layout) {
712. if ($this->template) {
713. $template = $this->context->smarty->fetch($this->template);
714. } else {
715. // For retrocompatibility with 1.4 controller
716.
717. ob_start();
718. $this->displayContent();
Argument [0] /data/vhosts/judoliga.cz/kwon.judoliga.cz/themes/ekg-eshop/product.tpl
204. $this->{'displayAjax'.$action}();
205. } elseif (method_exists($this, 'displayAjax')) {
206. $this->displayAjax();
207. }
208. } else {
209. $this->display();
210. }
211. } else {
212. $this->initCursedPage();
213. $this->smartyOutputContent($this->layout);
214. }
362. if (isset($params_hook_action_dispatcher)) {
363. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
364. }
365.
366. // Running controller
367. $controller->run();
368. } catch (PrestaShopException $e) {
369. $e->displayMessage();
370. }
371. }
372.
13. $this->controller = 'cartreplacement';
14. $this->front_controller = 3;
15. $_GET['module'] = 'cofiscart';
16. $_GET['fc'] = 'module';
17. }
18. return parent::dispatch(); // TODO: Change the autogenerated stub
19. }
20. }
22. * @copyright 2007-2017 PrestaShop SA
23. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
24. * International Registered Trademark & Property of PrestaShop SA
25. */
26. require(dirname(__FILE__).'/config/config.inc.php');
27. Dispatcher::getInstance()->dispatch();
28.