<?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>The Magento Expert</title>
	<atom:link href="https://www.the-mage-expert.com/tag/collection/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.the-mage-expert.com</link>
	<description>Your Magento Commerce Expert</description>
	<lastBuildDate>Tue, 24 Jan 2023 09:37:24 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.8.6</generator>
	<item>
		<title>Loading  a model without using IDs</title>
		<link>https://www.the-mage-expert.com/686/magento-loading-model-without-ids/</link>
		<comments>https://www.the-mage-expert.com/686/magento-loading-model-without-ids/#comments</comments>
		<pubDate>Thu, 09 Oct 2014 08:09:29 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[collection]]></category>
		<category><![CDATA[model]]></category>

		<guid isPermaLink="false">http://www.the-mage-expert.com/?p=686</guid>
		<description><![CDATA[Sometimes there is no id available for loading a model. If thats the case, the following code might help out. It loads a collection by an attribute like name or sku. [crayon-6ab6efc8d18df/] Afterwards, it is possible to iterate over the&#8230;]]></description>
				<content:encoded><![CDATA[<p>Sometimes there is no id available for loading a model. If thats the case, the following code might help out. It loads a collection by an attribute like name or sku.</p>
<p></p><pre class="crayon-plain-tag">$collectionData = Mage::getModel('modelname')-&gt;getCollection()-&gt;addFieldToFilter('attribute', 'attribute value');</pre><p></p>
<p>Afterwards, it is possible to iterate over the collection, get the id and load the model using that id.</p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/686/magento-loading-model-without-ids/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting the SQL of a collection</title>
		<link>https://www.the-mage-expert.com/358/magento-getting-sql-of-collection/</link>
		<comments>https://www.the-mage-expert.com/358/magento-getting-sql-of-collection/#comments</comments>
		<pubDate>Thu, 16 May 2013 10:12:56 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[collection]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.the-mage-expert.com/?p=358</guid>
		<description><![CDATA[Use the following code to get the underlying SQL of a Magento collection: [crayon-6ab6efc8db21b/]]]></description>
				<content:encoded><![CDATA[<p>Use the following code to get the underlying SQL of a Magento collection:</p>
<p></p><pre class="crayon-plain-tag">$sql = (string)$collection-&gt;getSelect();</pre><p></p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/358/magento-getting-sql-of-collection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
