MySQL error executing query: 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 '' at line 1
This problem could be caused by the LemonStand MySQL connection configuration errors. Please log into the LemonStand Configuration Tool and update the database connection parameters. Also please make sure that MySQL server is running.
Document | /phproad/modules/db/classes/db_mysqlidriver.php |
---|---|
Document type | PHP document |
Line | 101 |
Exception class | Phpr_DatabaseException |
// execute the statement $handle = mysqli_query(Db::$connection, $sql); // If error, generate exception if ($err = mysqli_errno(Db::$connection) != 0) { $exception = new Phpr_DatabaseException('MySQL error executing query: ' . mysqli_error(Db::$connection)); $exception->hint_message = 'This problem could be caused by the LemonStand MySQL connection configuration errors. Please log into the LemonStand Configuration Tool and update the database connection parameters. Also please make sure that MySQL server is running.'; throw $exception; } return $handle; }
# | Call Stack Code | Document | Line |
---|---|---|---|
35 | Db_MySQLiDriver->execute('insert into shop_product_cached_details (sku, property, value, updated_at) values ') | /phproad/modules/db/classes/db_sqlbase.php | 604 |
34 | Db_SqlBase->execute('insert into shop_product_cached_details (sku, property, value, updated_at) values ') | /phproad/modules/db/classes/db_sqlbase.php | 437 |
33 | Db_SqlBase->query('insert into shop_product_cached_details (sku, property, value, updated_at) values ') | /phproad/modules/db/classes/db_dbhelper.php | 56 |
32 | Db_DbHelper::query('insert into shop_product_cached_details (sku, property, value, updated_at) values ', array(0)) | /modules/shopproductbooking/controllers/booking.php | 150 |
31 | ProductBookingController::getRemoteProductDetails(array(1) [0 => 'brc45/45c']) | /modules/shopproductbooking/controllers/booking.php | 44 |
30 | ProductBookingController::getProductDetails(array(1) [0 => 'brc45/45c']) | /modules/shopproductbooking/classes/shopproductbooking_module.php | 58 |
29 | ShopProductBooking_Module->after_product_fetch(object(Shop_Product)) | ||
28 | call_user_func_array(array(2) [0 => object(ShopProductBooking_Module), 1 => 'after_product_fetch'], array(1) [0 => object(Shop_Product)]) | /phproad/system/class_functions.php | 18 |
27 | callFunction(array(2) [0 => object(ShopProductBooking_Module), 1 => 'after_product_fetch'], array(1) [0 => object(Shop_Product)]) | /phproad/modules/phpr/classes/phpr_events.php | 77 |
26 | Phpr_Events->fire_event(array(1) [name => 'shop:onAfterProductRecordFetch'], object(Shop_Product)) | ||
25 | call_user_func_array(array(2) [0 => object(Phpr_Events), 1 => 'fire_event'], array(2) [0 => array(1), 1 => object(Shop_Product)]) | /phproad/system/class_functions.php | 18 |
24 | callFunction(array(2) [0 => object(Phpr_Events), 1 => 'fire_event'], array(2) [0 => array(1), 1 => object(Shop_Product)]) | /phproad/modules/phpr/classes/phpr_events.php | 143 |
23 | Phpr_Events->fireEvent('shop:onAfterProductRecordFetch', object(Shop_Product)) | ||
22 | call_user_func_array(array(2) [0 => object(Phpr_Events), 1 => 'fireEvent'], array(2) [0 => 'shop:onAfterProductRecordFetch', 1 => object(Shop_Product)]) | /phproad/modules/phpr/classes/phpr_extensible.php | 159 |
21 | Phpr_Extensible->__call('fireEvent', array(2) [0 => 'shop:onAfterProductRecordFetch', 1 => object(Shop_Product)]) | /modules/shop/models/shop_product.php | 1861 |
20 | Backend_Events->fireEvent('shop:onAfterProductRecordFetch', object(Shop_Product)) | /modules/shop/models/shop_product.php | 1861 |
19 | Shop_Product->after_fetch(()) | /phproad/modules/db/classes/db_activerecord.php | 439 |
18 | Db_ActiveRecord->_find_fill(array(5) [0 => array(92), 1 => array(92), 2 => array(92), 3 => array(92), 4 => array(92)], null) | /phproad/modules/db/classes/db_activerecord.php | 513 |
17 | Db_ActiveRecord->find_all_internal(null, array(0), null) | /phproad/modules/db/classes/db_activerecord.php | 532 |
16 | Db_ActiveRecord->find_all(()) | /modules/cms/classes/cms_controller.php(383) : eval()'d code | 10 |
15 | eval(()) | /modules/cms/classes/cms_controller.php | 383 |
14 | Cms_Controller->evalWithException('?><?php if( isset($paginate) && $paginate ) { $page_index = isset($page_index) ? $page_index-1 : 0; $records_per_page = isset($records_per_page) ? $records_per_page : 48; $pagination = $products->paginate($page_index, $records_per_page); } else { $pagination = null; } $products = $products instanceof Db_ActiveRecord ? $products->find_all() : $products; ?> <ul class="product-list"> <?php foreach ($products as $product): ?> <li class="<?php echo isset($class) ? $class : 'three'; ?> columns catcol"> <div class="images"> <a href="<?php echo $product->page_url('/product'); ?>"> <?php /* Delete the following and uncomment the next block to show hide OM base images, and instead show the product base images */ ?> <?php $images = $product->om('images'); ?> <?php if($images->count): ?> <img class="primary" src="<?php echo $images[0]->getThumbnailPath(300, 300); ?>" title="<?php echo $product->name; ?>" alt="<?php echo $product->name; ?>" /> <?php endif; ?> <?php if($images->count > 1): ?> <img class="secondary" src="<?php echo $images[1]->getThumbnailPath(300, 300); ?>" title="<?php echo $product->name; ?>" alt="<?php echo $product->name; ?>" /> <?php endif; ?> <?php /* <?php if ($product->image_url(0, 320, 240)): ?> <img class="primary" src="<?php echo $product->image_url(0, 320, 240); ?>" alt="<?php echo $product->name; ?>" /> <?php endif; ?> <?php if ($product->image_url(1, 320, 240)): ?> <img class="secondary" src="<?php echo $product->image_url(1, 320, 240); ?>" alt="<?php echo $product->name; ?>" /> <?php endif; ?> */ ?> </a> </div> <!--<div class="rating stars-<?php echo str_replace('.', '-', $product->rating_approved); ?>"> <a href="<?php echo $product->page_url('/product'); ?>/#reviews"><?php echo $product->rating_review_num ? "{$product->rating_review_num} review(s)" : "0 review(s)"; ?></a> </div>--> <div class="stickers"> <!--<?php $interval = Phpr_DateTime::gmtNow()->substractDateTime($product->created_at); ?> <?php if($product->om('is_on_sale')): ?> <span class="sticker sale">Save<br /> <?php $sale_price_or_discount = $product->om('sale_price_or_discount'); if(strpos($sale_price_or_discount, '%')) { echo round($sale_price_or_discount); echo "%"; } else { echo format_currency(ltrim($sale_price_or_discount, '-')); } ?> </span> <?php elseif($interval->getDays() < 0) : ?> <span class="sticker new">New</span> <?php endif; ?>--> <?php if($product->x_bookpay <= 1 OR $product->x_bookpay <= 200): ?> <span class="sticker diytrade">DIY & Trade</span> <?php elseif($product->x_bookpay > 1): ?> <span class="sticker trade">Trade Only</span> <?php endif; ?> </div> <div class="stickers2"> <?php $interval = Phpr_DateTime::gmtNow()->substractDateTime($product->created_at); ?> <?php if($product->om('is_on_sale')): ?> <span class="sticker sale">Save<br /> <?php $sale_price_or_discount = $product->om('x_remote_discount') ?: $product->om('sale_price_or_discount'); if(strpos($sale_price_or_discount, '%')) { echo round($sale_price_or_discount); echo "%"; } else { echo format_currency(ltrim($sale_price_or_discount, '-')); } ?> <?php endif; ?> </span> </div> <div class="desc"> <h3> <a href="<?php echo $product->page_url('/product'); ?>"><?php echo h($product->name); ?></a> </h3> <!-- <?php if($product->om('is_on_sale')): ?> <span class="price"><?php echo format_currency($product->om('sale_price')); ?> <span class="base"><?php echo format_currency($product->om('price')); ?></span></span> <?php else: ?> <span class="price"><?php echo format_currency($product->om('sale_price')); ?></span> <?php endif; ?> --> <!--<?php if($product->om('price') >= 9999): ?> <span class="price">Call for Price</span> <?php elseif($product->om('is_on_sale')): ?> <span class="price"><?php echo format_currency($product->om('sale_price')); ?> <span class="base"><?php echo format_currency($product->om('price')); ?></span></span> <?php else: ?> <span class="price"><?php echo format_currency($product->om('sale_price')); ?></span> <?php endif; ?>--> </div> </li> <?php endforeach; ?> </ul> <!--<?php if($pagination) { $this->render_partial('shop:pagination', array( 'pagination' => $pagination, 'base_url' => $pagination_base_url )); } ?>-->', 'CMS partial', 'shop:product_list', array(6) [products => object(Shop_Product), class => 'four mobile-two', records_per_page => '80', paginate => '1', pagination_base_url => '/category/carpet-cleaner-hire', page_index => 'carpet-cleaner-hire']) | /modules/cms/classes/cms_controller.php | 1020 |
13 | Cms_Controller->render_partial('shop:product_list', array(6) [products => object(Shop_Product), class => 'four mobile-two', records_per_page => '80', paginate => '1', pagination_base_url => '/category/carpet-cleaner-hire', page_index => 'carpet-cleaner-hire']) | /modules/cms/classes/cms_controller.php(383) : eval()'d code | 118 |
12 | eval(()) | /modules/cms/classes/cms_controller.php | 383 |
11 | Cms_Controller->evalWithException('?><section class="content" style="padding-bottom:0px;"> <section class="category <?php echo $category->url_name; ?>"> <div class="row"> <div class="twelve columns"> <div id="category-page"> <? if ($category): $subcategories = $category->list_children('front_end_sort_order'); $has_subcategories = $subcategories->count; $has_products = $category->eval_num_of_products(); ?> <? if ($category): ?> <? foreach ($category->get_parents() as $parent): ?> <h2 style="display;display: inline; #414141; font-size:1.5em;"> <a href="<?= $parent->page_url('/category') ?>"><?= h($parent->title) ?></a> > </h2> <? endforeach ?> <? endif ?> <h1 style="display: inline; font-size:1.5em;"><?= $category->title ?></h1><br/><br/> <p class="description"><?= h($category->short_description) ?></p> <? if ($has_subcategories): ?> <ul class="product-list" style="min-height: 260px;"> <? foreach ($subcategories as $subcategory): ?> <li class="<?php echo isset($class) ? $class : 'four mobile-two'; ?> columns catcol"> <div class="images"> <a href="<?= $subcategory->page_url('category') ?>" title="<?= h($subcategory->name) ?>" class="product-list"><img src="<?= $subcategory->image_url(0, 320, 'auto') ?>" title="<?= h($subcategory->name) ?>" alt="<?= h($subcategory->images->title) ?>"/></a> </div> <div class="desc"> <a href="<?= $subcategory->page_url('category') ?>" title="<?= h($subcategory->name) ?>" class="product-list"><?= h($subcategory->name) ?></a> </div> </li> <? endforeach ?> </ul> <? endif ?> <? if ($has_products): ?> <? if ($has_subcategories): ?> <? if ($category->short_description): ?> <p class="description"><?= h($category->short_description) ?></p> <?= $category->description ?> <? endif ?> <hr /> <h1 class="hide-for-small">Popular Products</h1> <div id="product_list" class="hide-for-small" style="max-height:220px;"> <?php $this->render_partial('shop:product_list', array( 'products' => $category->list_products(array('sorting'=>array('price'))), 'class' => 'two mobile-two', 'records_per_page' => 6, 'paginate'=> true, 'pagination_base_url' => $category->page_url('/category'), 'page_index' => $this->request_param(-1, 0) )); ?> </div> <? endif ?> <!--<div id="category-products"> <? $this->render_partial('shop:categories') ?> </div>--> <? endif ?> <? if (!$has_subcategories && !$has_products): ?> <p>This category does not contain any products or subcategories.</p> <p><a href="<?= root_url('/')?>" title="Return to the home page">Return to the home page</a></p> <? endif ?> <? else: ?> <h1>Category not found</h1> <p>Sorry, the specified category cannot be found.</p> <p><a href="<?= root_url('/')?>" title="Return to the home page">Return to the home page</a></p> <? endif ?> </div> <div class="clearfix"></div> </div> </div> </section> </section> <? if (!$has_subcategories && $has_products): ?> <section class="content"> <section class="category <?php echo $category->url_name; ?>"> <div class="row"> <aside class="show-for-small twelve columns"> <div style="border-bottom: 1px solid #f6f6f6; padding-bottom: 15px;"> <? $this->render_partial('shop:categories2') ?> </div> </aside> <div class="twelve columns"> <!--<? foreach ($category->images as $image): ?> <img src="<?= $image->getThumbnailPath(675, 188) ?>"/> <? endforeach ?>--> <div id="product_list"> <?php $this->render_partial('shop:product_list', array( 'products' => $category->list_products(array('sorting'=>array('price desc'))), 'class' => 'four mobile-two', 'records_per_page' => 80, 'paginate'=> true, 'pagination_base_url' => $category->page_url('/category'), 'page_index' => $this->request_param(-1, 0) )); ?> </div> <p class="description"><?= ($category->description) ?></p> </div> </div> </section> </section> <? endif ?>', 'CMS page', 'Carpet Cleaner Hire') | /modules/cms/classes/cms_controller.php | 608 |
10 | Cms_Controller->eval_page_content(()) | /modules/cms/classes/cms_controller.php | 198 |
9 | Cms_Controller->open(object(Cms_Page), array(1) [0 => 'carpet-cleaner-hire']) | /controllers/application.php | 72 |
8 | Application->On404(()) | ||
7 | call_user_func_array(array(2) [0 => object(Application), 1 => 'On404'], array(0)) | /phproad/modules/phpr/classes/phpr_controller.php | 170 |
6 | Phpr_Controller->executeAction('On404', array(0)) | /phproad/modules/phpr/classes/phpr_controller.php | 84 |
5 | Phpr_Controller->_run('On404', array(0)) | /phproad/modules/phpr/classes/phpr_response.php | 64 |
4 | Phpr_Response->open404(()) | /phproad/modules/phpr/classes/phpr_response.php | 37 |
3 | Phpr_Response->open('/category/carpet-cleaner-hire') | /phproad/system/phproad.php | 31 |
2 | include('/var/www/vhosts/carpetcleaner-hire.co.uk/httpdocs/phproad/system/phproad.php') | /boot.php | 114 |
1 | require_once('/var/www/vhosts/carpetcleaner-hire.co.uk/httpdocs/boot.php') | /index.php | 3 |