我在尝试从我的数据库中检索信息时收到以下错误:SQL错误AS AS
您的SQL语法错误; 检查对应 你的MySQL服务器版本的 正确的语法使用附近的手册“FROM catalog_product_entity CPE内加入 catalog_product_entity_varchar CPEV O” 第5行
我使用的代码如下;
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_id
WHERE 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>";
}
我想要做的是从magento数据库检索产品以显示在非magento网站上。
哦,伙计。我准备回家了!哈。谢谢。 :d – doubleplusgood 2010-10-08 15:51:10