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 'LIMIT 1' at line 1select GROUP_CONCAT(id_group) from ps_customer_group WHERE id_customer = LIMIT 1
at line 727 in file classes/db/Db.php
722. if ($webservice_call && $errno) {
723. $dbg = debug_backtrace();
724. WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
725. } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) {
726. if ($sql) {
727. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');
728. }
729.
730. throw new PrestaShopDatabaseException($this->getMsgError());
731. }
732. }
358. $this->result = $this->_query($sql);
359. }
360. }
361.
362. if (_PS_DEBUG_SQL_) {
363. $this->displayError($sql);
364. }
365.
366. return $this->result;
367. }
368.
Argument [0] select GROUP_CONCAT(id_group) from ps_customer_group WHERE id_customer = LIMIT 1
625. $this->last_cached = true;
626. return $result;
627. }
628. }
629.
630. $this->result = $this->query($sql);
631. if (!$this->result) {
632. $result = false;
633. } else {
634. $result = $this->nextRow($this->result);
635. }
Argument [0] select GROUP_CONCAT(id_group) from ps_customer_group WHERE id_customer = LIMIT 1
657. {
658. if ($sql instanceof DbQuery) {
659. $sql = $sql->build();
660. }
661.
662. if (!$result = $this->getRow($sql, $use_cache)) {
663. return false;
664. }
665.
666. return array_shift($result);
667. }
Argument [0] select GROUP_CONCAT(id_group) from ps_customer_group WHERE id_customer = LIMIT 1 Argument [1] 1
321. /* The date is not taken into account for the cache, but this is for the better because it keeps the consistency for the whole script.
322. The price must not change between the top and the bottom of the page */
323.
324. $key = ((int)$id_product.'-'.(int)$id_shop.'-'.(int)$id_currency.'-'.(int)$id_country.'-'.(int)$id_group.'-'.(int)$quantity.'-'.(int)$id_product_attribute.'-'.(int)$id_cart.'-'.(int)$id_customer.'-'.(int)$real_quantity);
325. $sql = 'select GROUP_CONCAT(id_group) from ps_customer_group WHERE id_customer = '.$id_customer;
326. $groups = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($sql);
327. $grpquery = ' (0,'.$groups.') ';
328. if($groups == null){
329. $grpquery = ' (0) ';
330. }
331.
Argument [0] select GROUP_CONCAT(id_group) from ps_customer_group WHERE id_customer =
3130. $id_group,
3131. $quantity,
3132. $id_product_attribute,
3133. $id_customer,
3134. $id_cart,
3135. $real_quantity
3136. );
3137.
3138. if($_SERVER['REMOTE_ADDR'] == '49.36.65.132' ) {
3139. // print_r($specific_price);
3140. // die();
Argument [0] 15392 Argument [1] 1 Argument [2] 1 Argument [3] 15 Argument [4] 1 Argument [5] 1 Argument [6] 7269 Argument [7] Argument [8] Argument [9] 0
3054. $specific_price_output,
3055. $use_group_reduction,
3056. $id_customer,
3057. $use_customer_price,
3058. $id_cart,
3059. $cart_quantity
3060. );
3061.
3062. return $return;
3063. }
3064.
Argument [0] 1 Argument [1] 15392 Argument [2] 7269 Argument [3] 15 Argument [4] 0 Argument [5] 0 Argument [6] 1 Argument [7] 1 Argument [8] 1 Argument [9] Argument [10] 6 Argument [11] Argument [12] 1 Argument [13] 1 Argument [14] 0 Argument [15] 1 Argument [16] Argument [17] 1 Argument [18] Argument [19] 0
496.
497. if(Configuration::get('PVL_ACTIVE')) {
498. $this->pvl = $this->getPvl($context->currency->id);
499. }
500.
501. $this->price = Product::getPriceStatic((int)$this->id, false, null, 6, null, false, true, 1, false, null, null, null, $this->specificPrice);
502. $this->unit_price = ($this->unit_price_ratio != 0 ? $this->price / $this->unit_price_ratio : 0);
503. if ($this->id) {
504. $this->tags = Tag::getProductTags((int)$this->id);
505. }
506.
Argument [0] 15392 Argument [1] Argument [2] Argument [3] 6 Argument [4] Argument [5] Argument [6] 1 Argument [7] 1 Argument [8] Argument [9] Argument [10] Argument [11] Argument [12] 0
123. }
124.
125.
126.
127. if($id_product) {
128. $this->product = new Product($id_product, true, $this->context->language->id, $this->context->shop->id , $this->context , true);
129. $row = json_decode(json_encode($this->product) , true );
130. $product = Product::getProductProperties($this->context->language->id , $row);
131. $this->product->percentage_discount = $product['specific_prices']['reduction']*100;
132. // $this->product->relatedp = $product['relatedp'];
133. }
Argument [0] 15392 Argument [1] 1 Argument [2] 3 Argument [3] 1 Argument [4] Argument [5] 1
132. }
133.
134. /* Starts the controller process (this method should not be overridden!) */
135. public function run()
136. {
137. $this->init();
138. if ($this->checkAccess()) {
139. // setMedia MUST be called before postProcess
140. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
141. $this->setMedia();
142. }
381. if (isset($params_hook_action_dispatcher)) {
382. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
383. }
384.
385. // Running controller
386. $controller->run();
387.
388. } catch (PrestaShopException $e) {
389. $e->displayMessage();
390. }
391. }
1. <?php
2.
3. require(dirname(__FILE__).'/config/config.inc.php');
4. Dispatcher::getInstance()->dispatch();