<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Magento - Shopping Cart &#187; 1452</title>
	<atom:link href="http://www.magento.cn/tag/1452/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.magento.cn</link>
	<description>Magento template, Design, Hosting</description>
	<lastBuildDate>Fri, 03 Sep 2010 03:20:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Magento Database,Integrity constraint violation: 1452 Cannot add or update a child row</title>
		<link>http://www.magento.cn/142/magento-shopping-cart/magento-databaseintegrity-constraint-violation-1452-cannot-add-or-update-a-child-row/</link>
		<comments>http://www.magento.cn/142/magento-shopping-cart/magento-databaseintegrity-constraint-violation-1452-cannot-add-or-update-a-child-row/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 03:22:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[1452]]></category>
		<category><![CDATA[constraint violation]]></category>
		<category><![CDATA[Integrity]]></category>
		<category><![CDATA[update a child row]]></category>

		<guid isPermaLink="false">http://www.magento.cn/?p=142</guid>
		<description><![CDATA[This kind problem usually happen after change host and can&#8217;t save product. its show: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`/catalog_product_ website`, CONSTRAINT `FK_CATALOG_PRODUCT_WEBSITE_WEBSITE` FOREIGN KEY (`website_id`) REFERENCES `core_website` (`website_id`) ON DELETE CASCADE ON UPDATE CASCADE) You could try follow query to find out [...]]]></description>
			<content:encoded><![CDATA[<p>This kind problem usually happen after change host and can&#8217;t save product. its show:</p>
<p>SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`/catalog_product_</p>
<div id=":11j" class="ii gt">website`, CONSTRAINT `FK_CATALOG_PRODUCT_WEBSITE_WEBSITE` FOREIGN KEY (`website_id`) REFERENCES `core_website` (`website_id`) ON DELETE CASCADE ON UPDATE CASCADE)</div>
<div class="ii gt">You could try follow query to find out some incorrect product:</div>
<div class="ii gt">
<div class="codeblock"><code> <span style="color: #0000bb;">SELECT<br />
</span><span style="color: #007700;">*<br />
</span><span style="color: #0000bb;">FROM<br />
catalog_category_product_index<br />
LEFT<br />
JOIN<br />
catalog_product_entity<br />
ON catalog_category_product_index</span><span style="color: #007700;">.</span><span style="color: #0000bb;">product_id </span><span style="color: #007700;">= </span><span style="color: #0000bb;">catalog_product_entity</span><span style="color: #007700;">.</span><span style="color: #0000bb;">entity_id<br />
WHERE<br />
catalog_product_entity</span><span style="color: #007700;">.</span><span style="color: #0000bb;">entity_id IS NULL</span></code></div>
<p>deleted all the incorrect products to try. good luck</p>
<p><a title="magento" href="http://www.magento.cn">magento</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.magento.cn/142/magento-shopping-cart/magento-databaseintegrity-constraint-violation-1452-cannot-add-or-update-a-child-row/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
