MySQL error with SQL AS

piotrek18usa

New Member
I'm receiving the following error with this page while trying to retrieve information from my database;\[quote\] 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 'FROM catalog_product_entity cpe inner join catalog_product_entity_varchar cpev o' at line 5\[/quote\]The code I am using is as follows;\[code\]include("conn.php");//Get all products that are configurable$query = "SELECT cpe.entity_id entity,cpe.sku sku,cpe.category_ids categories,cpev.value title,FROM catalog_product_entity cpe inner join catalog_product_entity_varchar cpev on cpe.entity_id = cpev.entity_idWHERE cpe.type_id = 'configurable' LIMIT 0,30";$result = mysql_query($query) or die(mysql_error());while($row = mysql_fetch_assoc($result)){ echo "id :{$row['entity']} <br>" . "sku :{$row['sku']} <br>" . "value :{$row['title']} <br>" . "Categories : {$row['categories']} <br>";} \[/code\]What I am trying to do is to retrieve products from a magento database to display on a non-magento site.Wondered if anyone might be able to help me resolve this error.Thanks
 
Back
Top