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 '"availability FROM `ps_product` p LEFT JOIN `ps_product_attribute` pa ON (p.' at line 5

		SELECT p.*, pa.`id_product_attribute`, pl.`description`, pl.`description_short`, pl.`link_rewrite`, pl.`meta_description`, pl.`meta_keywords`, pl.`meta_title`, pl.`name`, i.`id_image`, il.`legend`, m.`name` AS manufacturer_name, tl.`name` AS tax_name, t.`rate`, DATEDIFF(p.`date_add`, DATE_SUB(NOW(), INTERVAL 20 DAY)) > 0 AS new,
			(p.`price` * ((100 + (t.`rate`))/100)) AS orderprice,
			IF (i.`id_image` IS NULL, 0, 1) AS img_sort,
			ps.quantity as sales, pavl.`name` as "availability
		FROM `ps_product` p
		LEFT JOIN `ps_product_attribute` pa ON (p.`id_product` = pa.`id_product` AND default_on = 1)
		LEFT JOIN `ps_product_lang` pl ON (p.`id_product` = pl.`id_product` AND pl.`id_lang` = 6)
		LEFT JOIN `ps_image` i ON (i.`id_product` = p.`id_product` AND i.`cover` = 1)
		LEFT JOIN `ps_image_lang` il ON (i.`id_image` = il.`id_image` AND il.`id_lang` = 6)
		LEFT JOIN `ps_tax_rule` tr ON (p.`id_tax_rules_group` = tr.`id_tax_rules_group`
		                                           AND tr.`id_country` = 16
	                                           	   AND tr.`id_state` = 0)
	    LEFT JOIN `ps_tax` t ON (t.`id_tax` = tr.`id_tax`)
		LEFT JOIN `ps_tax_lang` tl ON (t.`id_tax` = tl.`id_tax` AND tl.`id_lang` = 6)
		LEFT JOIN `ps_manufacturer` m ON m.`id_manufacturer` = p.`id_manufacturer`
		LEFT JOIN `ps_product_availability` pav ON (pav.`id_product_availability` = p.`id_product_availability`)
		LEFT JOIN `ps_product_availability_lang` pavl ON (pav.`id_product_availability` = pavl.`id_product_availability` AND pavl.`id_lang` = 6)
		LEFT JOIN `ps_product_sale` ps ON (ps.`id_product` = p.`id_product`)
		WHERE p.`id_manufacturer` = 4 AND p.`active` = 1
		AND p.`id_product` IN (
					SELECT cp.`id_product`
					FROM `ps_category_group` cg
					LEFT JOIN `ps_category_product` cp ON (cp.`id_category` = cg.`id_category`) INNER JOIN `ps_category` ca ON cp.`id_category` = ca.`id_category` AND ca.`active` = 1
					WHERE cg.`id_group` = 1
		ORDER BY pav.can_buy DESC, img_sort DESC, p.id_product_availability DESC, `name` asc
		LIMIT 0,21