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 'AND `med`.`published`=1 
							AND `med`.`file_mimetype` LIKE 'image/%'
					OR' at line 8 SQL=SELECT *
					FROM 
							fet_virtuemart_product_medias AS `pm`
							INNER JOIN fet_virtuemart_medias AS `med`
								ON `pm`.`virtuemart_media_id`=`med`.`virtuemart_media_id`
					WHERE 
							`pm`.`virtuemart_product_id`=
							AND `med`.`published`=1 
							AND `med`.`file_mimetype` LIKE 'image/%'
					ORDER BY 
							`pm`.`ordering` ASC
					LIMIT 1