select goods.*,documents.address from goods_category inner JOIN goods ON goods.goods_categoryId = goods_category.id inner join customer_shop on goods_category.customerId = customer_shop.customerId left join documents on goods.picId1=documents.id where customer_shop.customerId = '111' and customer_shop.isExist = 1 and customer_shop.isActive=1 and goods_category.isActive=1 and goods.isActive=1 and goods.picId1 is not null and goods_category.id=index.php order by (goods.productView) ASC mysql_error:Unknown column 'index.php' in 'where clause'