Database_Exception [ 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 '' at line 1 [ select t1.collection_id ,t2.discount as discount from con_collection_product as t1 left join con_collection as t2 on(t2.id=t1.collection_id) where t1.product_id= ]

MODPATH/database/classes/kohana/database/mysql.php [ 181 ]

176 			{
177 				// This benchmark is worthless
178 				Profiler::delete($benchmark);
179 			}
180 
181 			throw new Database_Exception(':error [ :query ]',
182 				array(':error' => mysql_error($this->_connection), ':query' => $sql),
183 				mysql_errno($this->_connection));
184 		}
185 
186 		if (isset($benchmark))
  1. MODPATH/database/classes/kohana/database/query.php [ 226 ] » Kohana_Database_MySQL->query(arguments)

  2. APPPATH/classes/help.php [ 520 ] » Kohana_Database_Query->execute()

  3. APPPATH/classes/controller/product.php [ 127 ] » Help::get_collection_discount(arguments)

  4. {PHP internal call} » Controller_Product->action_index()

  5. SYSPATH/classes/kohana/request/client/internal.php [ 132 ] » ReflectionMethod->invokeArgs(arguments)

  6. SYSPATH/classes/kohana/request.php [ 1160 ] » Kohana_Request_Client_Internal->execute(arguments)

  7. DOCROOT/index.php [ 180 ] » Kohana_Request->execute()

Environment