Unhandled Error!

MySQL error executing query: 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 '))' at line 7

Hint

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_mysqldriver.php
Document type PHP document
Line 114
Exception class Phpr_DatabaseException

Code Highlight

 
			// execute the statement
			$handle = @mysql_query($sql, Db::$connection);
 
			// If error, generate exception
			if ($err = @mysql_errno(Db::$connection) != 0) {
				$exception = new Phpr_DatabaseException('MySQL error executing query: '.@mysql_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
21 Db_MySQLDriver->execute('SELECT count(*) FROM shop_products LEFT JOIN pages ON shop_products.page_id=pages.id LEFT JOIN pages as page_calculated_join ON page_calculated_join.id = shop_products.page_id LEFT JOIN shop_product_types as product_type_calculated_join ON product_type_calculated_join.id = shop_products.product_type_id LEFT JOIN shop_manufacturers as manufacturer_link_calculated_join ON manufacturer_link_calculated_join.id = shop_products.manufacturer_id LEFT JOIN shop_tax_classes as tax_class_calculated_join ON tax_class_calculated_join.id = shop_products.tax_class_id WHERE (shop_products.id IN())') /phproad/modules/db/classes/db_sqlbase.php 604
20 Db_SqlBase->execute('SELECT count(*) FROM shop_products LEFT JOIN pages ON shop_products.page_id=pages.id LEFT JOIN pages as page_calculated_join ON page_calculated_join.id = shop_products.page_id LEFT JOIN shop_product_types as product_type_calculated_join ON product_type_calculated_join.id = shop_products.product_type_id LEFT JOIN shop_manufacturers as manufacturer_link_calculated_join ON manufacturer_link_calculated_join.id = shop_products.manufacturer_id LEFT JOIN shop_tax_classes as tax_class_calculated_join ON tax_class_calculated_join.id = shop_products.tax_class_id WHERE (shop_products.id IN())') /phproad/modules/db/classes/db_sqlbase.php 437
19 Db_SqlBase->query('SELECT count(*) FROM shop_products LEFT JOIN pages ON shop_products.page_id=pages.id LEFT JOIN pages as page_calculated_join ON page_calculated_join.id = shop_products.page_id LEFT JOIN shop_product_types as product_type_calculated_join ON product_type_calculated_join.id = shop_products.product_type_id LEFT JOIN shop_manufacturers as manufacturer_link_calculated_join ON manufacturer_link_calculated_join.id = shop_products.manufacturer_id LEFT JOIN shop_tax_classes as tax_class_calculated_join ON tax_class_calculated_join.id = shop_products.tax_class_id WHERE (shop_products.id IN())') /phproad/modules/db/classes/db_sqlbase.php 557
18 Db_SqlBase->fetchOne('SELECT count(*) FROM shop_products LEFT JOIN pages ON shop_products.page_id=pages.id LEFT JOIN pages as page_calculated_join ON page_calculated_join.id = shop_products.page_id LEFT JOIN shop_product_types as product_type_calculated_join ON product_type_calculated_join.id = shop_products.product_type_id LEFT JOIN shop_manufacturers as manufacturer_link_calculated_join ON manufacturer_link_calculated_join.id = shop_products.manufacturer_id LEFT JOIN shop_tax_classes as tax_class_calculated_join ON tax_class_calculated_join.id = shop_products.tax_class_id WHERE (shop_products.id IN())') /phproad/modules/db/classes/db_activerecord.php 1533
17 Db_ActiveRecord->requestRowCount(()) /phproad/modules/db/classes/db_activerecord.php 2498
16 Db_ActiveRecord->paginate(0, 10) /modules/cms/classes/cms_controller.php(383) : eval()'d code 5
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 : 10; $pagination = $products->paginate($page_index, $records_per_page); } else { $pagination = null; } $products = $products->find_all(); # $products = $products instanceof Db_ActiveRecord ? $products->find_all() : $products; # if ($products instanceof Db_ActiveRecord) { # print "yes"; # } else { # print "no"; # } ?> <ul class="block-grid five-up mobile-two-up" id="loop_container"> <?php foreach ($products as $product): ?> <? preg_match('/v=([^&]+)/', $product->x_youtube_link, $match); $theYTid = $match[1]; ?> <li> <div class="image_container"> <a href="#" id="<?=$theYTid?>" title="Play"> <? if(is_file($_SERVER['DOCUMENT_ROOT'].$product->images->first->getPath())) { $image_size = @getimagesize(site_url($product->images->first->getPath())); $image_width = $image_size[0]; $image_height = $image_size[1]; } if ($image_width > $image_height) { $image_resize = "184x"; } else if ($image_width < $image_height) { $image_resize = "x115"; } else { $image_resize = "184x115"; } $image_url = $product->images->first->getThumbnailPath(184, 115, true, array('im_process'=>true, 'size_name'=>'cropped_184x115', 'cmd'=>'-resize ' . $image_resize . ' -gravity center -crop 184x115+0+0 ')); ?> <img src="<?php if($_SERVER['HTTP_HOST'] != 'mydev.m2') echo $image_url; ?>" alt="Video Background" /> <img class="play_btn" src="/themes/sydell/resources/images/main/btn_play.png" alt="Play" /> </a> </div> <h3><?=$product->name?></h3> <? $thep = ($product->category_list[0]->parent)? $product->category_list[0]->parent : $product->category_list[0]; ?> <a class="view_product" href="<?=$product->page_url('/product');?>" title="View Product" target="_self">View Product</a> </li> <?php endforeach; ?> </ul> <?php if($pagination) { $this->render_partial('shop:pagination', array( 'pagination' => $pagination, 'extra_arg' => $this->request_param(1,0), 'base_url' => $pagination_base_url )); } ?> ', 'CMS partial', 'shop:video_list', array(5) [products => object(Shop_Product), records_per_page => '10', paginate => '1', pagination_base_url => '/product-videos', page_index => '1']) /modules/cms/classes/cms_controller.php 1020
13 Cms_Controller->render_partial('shop:video_list', array(5) [products => object(Shop_Product), records_per_page => '10', paginate => '1', pagination_base_url => '/product-videos', page_index => '1']) /modules/cms/classes/cms_controller.php(383) : eval()'d code 48
12 eval(()) /modules/cms/classes/cms_controller.php 383
11 Cms_Controller->evalWithException('?><div class="row container" id="product-videos-page"> <div class="columns twelve"> <h1><?php echo $this->page->title; ?></h1> </div> <div class="columns twelve"> </div> <div class="columns twelve"> <?php $catboxes_to_list = Db_DbHelper::queryArray("SELECT SC.id, SC.name FROM shop_products SP LEFT JOIN shop_products_categories SPC ON SP.id = SPC.shop_product_id LEFT JOIN shop_categories SC ON SPC.shop_category_id = SC.id AND SC.category_id IS NULL where SP.x_youtube_link IS NOT NULL AND SC.name IS NOT NULL GROUP BY SC.id"); $this->render_partial('shop:catbox_list', array( 'catboxes'=>$catboxes_to_list, 'url_seg'=> '/product-videos', 'current'=>$this->request_param(1) )); ?> </div> <div class="columns twelve"> <? #$products = Shop_Product::create()->where('shop_products.x_youtube_link IS NOT NULL'); ?> <? if ($this->request_param(1,0)) { $sqlextra = " AND SC.id = ".$this->request_param(1,0); } else { $sqlextra = ''; } $prodonly = Db_DbHelper::queryArray('SELECT SP.id FROM shop_products SP LEFT JOIN shop_products_categories SPC ON SP.id = SPC.shop_product_id LEFT JOIN shop_categories SC ON SPC.shop_category_id = SC.id AND SC.category_id IS NULL where SP.x_youtube_link IS NOT NULL AND SC.name IS NOT NULL '.$sqlextra); $filtered_ids = array(); foreach ($prodonly as $justprod) { $filtered_ids[] = $justprod['id']; } $products = Shop_Product::find_products('', new Phpr_Pagination(10), 0, array('category_ids' => array('48')))->where('shop_products.id IN('.join(',',$filtered_ids).')'); #} ?> <? $this->render_partial('shop:video_list', array( 'products'=>$products, 'records_per_page'=>10, 'paginate'=>true, 'pagination_base_url'=>'/product-videos', 'page_index'=>$this->request_param(0, 0) )) ?> </div> </div> <!-- Modal Iframed Video Code --> <div id="myModal" class="reveal-modal large"> <div class="flex-vidoe widescreen"> <iframe id="ytplayer" type="text/html" width="100%" height="400" src="" frameborder="0"></iframe> </div> <a class="close-reveal-modal">&#215;</a> </div> <!-- JQuery Syntax --> <script type="text/javascript"> $(document).ready(function(){ $(".image_container a").click(function() { var link_id = $(this).attr('id'); var link = 'https://www.youtube.com/embed/'+link_id+'?autoplay=0&rel=0&controls=1&autohide=2'; $('#ytplayer').attr('src', link); $("#myModal").reveal({ "closed": function () { $('#ytplayer').attr('src', ''); } }); }); }) </script>', 'CMS page', 'Product Videos') /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(2) [0 => '1', 1 => '91']) /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('/product-videos/1/91') /phproad/system/phproad.php 31
2 include('/home/sydell/public_html/phproad/system/phproad.php') /boot.php 114
1 require_once('/home/sydell/public_html/boot.php') /index.php 3