<?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>Tips, Techniques and Guides Magento Software</title>
	<atom:link href="http://www.knowmagento.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.knowmagento.com</link>
	<description>Learning Magento One Stumble at a Time</description>
	<lastBuildDate>Tue, 22 Nov 2011 05:26:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Create Custom Category Attributes with phpMyAdmin (Tutorial)</title>
		<link>http://www.knowmagento.com/custom-category-attributes-with-phpmyadmin/</link>
		<comments>http://www.knowmagento.com/custom-category-attributes-with-phpmyadmin/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 21:46:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Categories]]></category>
		<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://www.knowmagento.com/?p=47</guid>
		<description><![CDATA[The following is a brief tutorial for creating a custom category attribute. This has only been tested by creating a textfield-type attribute in Magento&#8217;s version 1.3.2. However, to the best of my current knowledge, it should work in any versions 1.2+ and for any type of attribute. Note: changing the attribute type will require a [...]]]></description>
			<content:encoded><![CDATA[<p>The following is a brief tutorial for creating a custom category attribute.  This has only been tested by creating a textfield-type attribute in Magento&#8217;s version 1.3.2.  However, to the best of my current knowledge, it should work in any versions 1.2+ and for any type of attribute.  Note: changing the attribute type will require a couple changes to the SQL below.  So on we go&#8230;</p>
<ol>
<li>Open your Magento database using phpMyAdmin.</li>
<li>We will first find the proper attribute_id for your new attribute.  Run the following SQL statement and keep the resulting number handy: 
<pre>SELECT MAX(attribute_id) + 1 from eav_attribute</pre>
</li>
<li>From the left pane, click the eav_attribute table link.</li>
<li>Click Export tab link near the top of the page.</li>
<li>Ensure the Data box is checked then click the Go button.</li>
<li>Scroll through the list of attributes on your page and find the one that has a second comma delimited value of 3 and a third comma delimited value of meta_description.</li>
<li>Copy that entire row, excluding the comma at the end (i.e from opening parenthesis to closing parenthesis).</li>
<li>Click your browser&#8217;s back button.</li>
<li>Now run the following SQL command:
<pre>INSERT INTO eav_attribute VALUES</pre>
<p>followed by the text you copied about the meta_description.  Don&#8217;t click the Go button just yet &#8211; let&#8217;s alter that command a bit:</li>
<li>Change the first comma delimited number value to your new attribute_id value (found in step 2 above).  Then change the value from meta_description to some unique identifier for your attribute.  Then change the value that reads Meta Description to a proper label for your new attribute.  Now you can click Go to run the command.</li>
<li>The new attribute is created.  Now we need to ensure it has a proper sort order.  For this tutorial we will place it at the end of the list under the category&#8217;s General Information tab in the admin panel.  Run the following SQL command and keep the resulting number handy as it will be the new attribute&#8217;s sort order:
<pre>SELECT MAX(sort_order) + 1 from eav_entity_attribute where attribute_set_id = 3</pre>
</li>
<li>Now run the following SQL command, but replace the last two fields with the values from step 2 and step 11: 
<pre>INSERT INTO eav_entity_attribute ( entity_type_id, attribute_set_id, attribute_group_id, attribute_id, sort_order ) VALUES ( 3, 3, 3, [your new attribute_id], [your new sort_order] )</pre>
</li>
</ol>
<p>And that should do it.  If you bounce into your admin panel, you should see your new attribute for any given category &#8211; new or edit.  I&#8217;ll let you figure out how to use it from there <img src='http://www.knowmagento.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.knowmagento.com/custom-category-attributes-with-phpmyadmin/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>./pear: Permission denied</title>
		<link>http://www.knowmagento.com/pear-permission-denied/</link>
		<comments>http://www.knowmagento.com/pear-permission-denied/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 14:24:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Extensions]]></category>
		<category><![CDATA[Upgrading]]></category>

		<guid isPermaLink="false">http://www.knowmagento.com/?p=45</guid>
		<description><![CDATA[If your&#8217;re getting a permission denied error when trying to either upgrade or install an extension, chances are the permissions are off on your pear file. No worries &#8211; it&#8217;s a simple fix. SSH into the root directory of your Magento installation and type the following command: chmod 550 pear]]></description>
			<content:encoded><![CDATA[<p>If your&#8217;re getting a permission denied error when trying to either upgrade or install an extension, chances are the permissions are off on your pear file.  No worries &#8211; it&#8217;s a simple fix.  SSH into the root directory of your Magento installation and type the following command:</p>
<pre>chmod 550 pear</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.knowmagento.com/pear-permission-denied/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Cleaning (Refreshing) Cache</title>
		<link>http://www.knowmagento.com/cleaning-refreshing-cache/</link>
		<comments>http://www.knowmagento.com/cleaning-refreshing-cache/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 16:46:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cache]]></category>

		<guid isPermaLink="false">http://www.knowmagento.com/?p=39</guid>
		<description><![CDATA[The Magento Admin panel calls it refreshing (Refresh) the cache, while within the code it&#8217;s refered to as &#8220;cleaning&#8221; the cache. If you want to Refresh your cache within the admin panel, simply go to System &#62; Cache Management.  Drop the box labeled &#8220;All cache&#8221; down to the Refresh option and hit the Save cache [...]]]></description>
			<content:encoded><![CDATA[<p>The Magento Admin panel calls it refreshing (Refresh) the cache, while within the code it&#8217;s refered to as &#8220;cleaning&#8221; the cache.</p>
<p>If you want to Refresh your cache within the admin panel, simply go to System &gt; Cache Management.  Drop the box labeled &#8220;All cache&#8221; down to the Refresh option and hit the Save cache setting button near the upper-right of the window.</p>
<p>If you want to clear your cache from the command line, SSH into your server and get into the base directory of your magento installation.  Type the following commands:</p>
<pre>cd var/cache
rm -rf *</pre>
<p>If you want to clean the cache from within your code (maybe within a cron or something), you&#8217;ll need to place the following PHP code within your script wherever you need the cache cleaned:</p>
<pre>Mage::app()->cleanCache();</pre>
<p>I&#8217;ve also seen the above written as:</p>
<pre>Mage::app()->getCache()->clean();</pre>
<p>However, the first way is preferred, since it allows for tags to be passed (outside the scope of this post) and also cleans the configuration cache.</p>
<p>If you&#8217;re creating a cron file that is outside of your Magento installation, you can use the following method so long as your cron script is running on the same server and has access to the Mage file system:</p>
<pre>$mage_filename = '/[YOUR PATH TO MAGENTO]/app/Mage.php';
require_once $mage_filename;
umask(0);
Mage::run();
Mage::app()->cleanCache();</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.knowmagento.com/cleaning-refreshing-cache/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Adding extentions from the command line</title>
		<link>http://www.knowmagento.com/adding-extentions-from-the-command-line/</link>
		<comments>http://www.knowmagento.com/adding-extentions-from-the-command-line/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 14:51:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Extensions]]></category>
		<category><![CDATA[Upgrading]]></category>

		<guid isPermaLink="false">http://www.knowmagento.com/?p=36</guid>
		<description><![CDATA[I&#8217;ve found it&#8217;s sometimes easier to either make upgrades or install extensions via the command line rather than using Magento Connect. To do this, all you need is the extension key. For this example I&#8217;ll use Magento&#8217;s default upgrade key: magento-core/Mage_All_Latest ./pear install magento-core/Mage_All_Latest Easy enough?]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve found it&#8217;s sometimes easier to either make upgrades or install extensions via the command line rather than using Magento Connect.  To do this, all you need is the extension key.  For this example I&#8217;ll use Magento&#8217;s default upgrade key: magento-core/Mage_All_Latest</p>
<pre>./pear install magento-core/Mage_All_Latest</pre>
<p>Easy enough?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.knowmagento.com/adding-extentions-from-the-command-line/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Available conditionals for addAttributeToFilter()</title>
		<link>http://www.knowmagento.com/available-conditionals-for-addattributetofilter/</link>
		<comments>http://www.knowmagento.com/available-conditionals-for-addattributetofilter/#comments</comments>
		<pubDate>Wed, 27 May 2009 17:00:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.knowmagento.com/?p=34</guid>
		<description><![CDATA[I got a little tired of always referencing a code file in order to remember the conditionals for addAttributeToFilter(). I&#8217;ll come back to this post to clean it up and make it an easier reference, but for now it&#8217;s just a code reference in an easy place to find it /** * Build SQL statement [...]]]></description>
			<content:encoded><![CDATA[<p>I got a little tired of always referencing a code file in order to remember the conditionals for addAttributeToFilter().  I&#8217;ll come back to this post to clean it up and make it an easier reference, but for now it&#8217;s just a code reference in an easy place to find it <img src='http://www.knowmagento.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<pre>    /**
     * Build SQL statement for condition
     *
     * If $condition integer or string - exact value will be filtered
     *
     * If $condition is array is - one of the following structures is expected:
     * - array("from"=&gt;$fromValue, "to"=&gt;$toValue)
     * - array("like"=&gt;$likeValue)
     * - array("neq"=&gt;$notEqualValue)
     * - array("in"=&gt;array($inValues))
     * - array("nin"=&gt;array($notInValues))
     *
     * If non matched - sequential array is expected and OR conditions
     * will be built using above mentioned structure
     *
     * @param string $fieldName
     * @param integer|string|array $condition
     * @return string
     */
    protected function _getConditionSql($fieldName, $condition) {
        if (is_array($fieldName)) {
            foreach ($fieldName as $f) {
                $orSql = array();
                foreach ($condition as $orCondition) {
                    $orSql[] = "(".$this-&gt;_getConditionSql($f[0], $f[1]).")";
                }
                $sql = "(".join(" or ", $orSql).")";
            }
            return $sql;
        }

        $sql = '';
        $fieldName = $this-&gt;_getConditionFieldName($fieldName);
        if (is_array($condition)) {
            if (isset($condition['from']) || isset($condition['to'])) {
                if (isset($condition['from'])) {
                    if (empty($condition['date'])) {
                        if ( empty($condition['datetime'])) {
                            $from = $condition['from'];
                        }
                        else {
                            $from = $this-&gt;getConnection()-&gt;convertDateTime($condition['from']);
                        }
                    }
                    else {
                        $from = $this-&gt;getConnection()-&gt;convertDate($condition['from']);
                    }
                    $sql.= $this-&gt;getConnection()-&gt;quoteInto("$fieldName &gt;= ?", $from);
                }
                if (isset($condition['to'])) {
                    $sql.= empty($sql) ? '' : ' and ';

                    if (empty($condition['date'])) {
                        if ( empty($condition['datetime'])) {
                            $to = $condition['to'];
                        }
                        else {
                            $to = $this-&gt;getConnection()-&gt;convertDateTime($condition['to']);
                        }
                    }
                    else {
                        $to = $this-&gt;getConnection()-&gt;convertDate($condition['to']);
                    }

                    $sql.= $this-&gt;getConnection()-&gt;quoteInto("$fieldName &lt;= ?", $to);
                }
            }
            elseif (isset($condition['eq'])) {
                $sql = $this-&gt;getConnection()-&gt;quoteInto("$fieldName = ?", $condition['eq']);
            }
            elseif (isset($condition['neq'])) {
                $sql = $this-&gt;getConnection()-&gt;quoteInto("$fieldName != ?", $condition['neq']);
            }
            elseif (isset($condition['like'])) {
                $sql = $this-&gt;getConnection()-&gt;quoteInto("$fieldName like ?", $condition['like']);
            }
            elseif (isset($condition['nlike'])) {
                $sql = $this-&gt;getConnection()-&gt;quoteInto("$fieldName not like ?", $condition['nlike']);
            }
            elseif (isset($condition['in'])) {
                $sql = $this-&gt;getConnection()-&gt;quoteInto("$fieldName in (?)", $condition['in']);
            }
            elseif (isset($condition['nin'])) {
                $sql = $this-&gt;getConnection()-&gt;quoteInto("$fieldName not in (?)", $condition['nin']);
            }
            elseif (isset($condition['is'])) {
                $sql = $this-&gt;getConnection()-&gt;quoteInto("$fieldName is ?", $condition['is']);
            }
            elseif (isset($condition['notnull'])) {
                $sql = "$fieldName is NOT NULL";
            }
            elseif (isset($condition['null'])) {
                $sql = "$fieldName is NULL";
            }
            elseif (isset($condition['moreq'])) {
                $sql = $this-&gt;getConnection()-&gt;quoteInto("$fieldName &gt;= ?", $condition['moreq']);
            }
            elseif (isset($condition['gt'])) {
                $sql = $this-&gt;getConnection()-&gt;quoteInto("$fieldName &gt; ?", $condition['gt']);
            }
            elseif (isset($condition['lt'])) {
                $sql = $this-&gt;getConnection()-&gt;quoteInto("$fieldName &lt; ?", $condition['lt']);
            }
            elseif (isset($condition['gteq'])) {
                $sql = $this-&gt;getConnection()-&gt;quoteInto("$fieldName &gt;= ?", $condition['gteq']);
            }
            elseif (isset($condition['lteq'])) {
                $sql = $this-&gt;getConnection()-&gt;quoteInto("$fieldName &lt;= ?", $condition['lteq']);
            }
            elseif (isset($condition['finset'])) {
                $sql = $this-&gt;getConnection()-&gt;quoteInto("find_in_set(?,$fieldName)", $condition['finset']);
            }
            else {
                $orSql = array();
                foreach ($condition as $orCondition) {
                    $orSql[] = "(".$this-&gt;_getConditionSql($fieldName, $orCondition).")";
                }
                $sql = "(".join(" or ", $orSql).")";
            }
        } else {
            $sql = $this-&gt;getConnection()-&gt;quoteInto("$fieldName = ?", (string)$condition);
        }
        return $sql;
    }</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.knowmagento.com/available-conditionals-for-addattributetofilter/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Simple Magento Upgrade</title>
		<link>http://www.knowmagento.com/simple-magento-upgrade/</link>
		<comments>http://www.knowmagento.com/simple-magento-upgrade/#comments</comments>
		<pubDate>Wed, 13 May 2009 15:24:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://knowmagento.com/?p=28</guid>
		<description><![CDATA[Of course, you should do a full backup of Magento before performing any upgrade. Once you&#8217;ve done that, the following extension key will take care of all the upgrades you&#8217;ll need at the core level: magento-core/Mage_All_Latest Simply type that into your Magento Connect Manager where it reads: Paste extension key to install: Then hit your [...]]]></description>
			<content:encoded><![CDATA[<p>Of course, you should do a full backup of Magento before performing any upgrade.  Once you&#8217;ve done that, the following extension key will take care of all the upgrades you&#8217;ll need at the core level:</p>
<pre>magento-core/Mage_All_Latest</pre>
<p>Simply type that into your Magento Connect Manager where it reads:</p>
<address>Paste extension key to install:</address>
<p>Then hit your Install button.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.knowmagento.com/simple-magento-upgrade/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PEAR ERROR: Upgrade Failed</title>
		<link>http://www.knowmagento.com/upgrade-failed-pear-error/</link>
		<comments>http://www.knowmagento.com/upgrade-failed-pear-error/#comments</comments>
		<pubDate>Wed, 13 May 2009 15:21:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Upgrading]]></category>

		<guid isPermaLink="false">http://knowmagento.com/?p=26</guid>
		<description><![CDATA[This is an awful message to see in the &#8220;Auto-scroll console contents&#8221; section of the Magento Connect Manager Downloader page. I got the following message when I tried to upgrade recently: PEAR ERROR: upgrade failed So I did a bit of investigating and found that I needed to do some manual cache clearing to fix [...]]]></description>
			<content:encoded><![CDATA[<p>This is an awful message to see in the &#8220;Auto-scroll console contents&#8221; section of the Magento Connect Manager Downloader page.  I got the following message when I tried to upgrade recently:</p>
<pre>PEAR ERROR: upgrade failed</pre>
<p>So I did a bit of investigating and found that I needed to do some manual cache clearing to fix the problem.  SSH into your Magento core directory and type the following commands (be sure to do this in order&#8230; it is spelled out to be safe):</p>
<pre>cd downloader/pearlib/cache
rm -rf *
cd ../download
rm -rf *</pre>
<p>Then go back into your Connect Manager and try to <a href="http://www.knowmagento.com/2009/05/13/simple-magento-upgrade/">upgrade Magento</a> again.  If you got the above error, you should be golden.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.knowmagento.com/upgrade-failed-pear-error/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Change MySQL Database Settings</title>
		<link>http://www.knowmagento.com/change-mysql-database-settings/</link>
		<comments>http://www.knowmagento.com/change-mysql-database-settings/#comments</comments>
		<pubDate>Wed, 13 May 2009 14:52:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://knowmagento.com/?p=20</guid>
		<description><![CDATA[This probably seems like a no-brainer for many people, but it came up today and I didn&#8217;t have an immediate answer.  So, if you want to change any of your MySQL database access settings (like your database name, database username, database password or database host), you&#8217;ll need to do it within the following file: /app/etc/local.xml [...]]]></description>
			<content:encoded><![CDATA[<p>This probably seems like a no-brainer for many people, but it came up today and I didn&#8217;t have an immediate answer.  So, if you want to change any of your MySQL database access settings (like your database name, database username, database password or database host), you&#8217;ll need to do it within the following file:</p>
<pre>/app/etc/local.xml</pre>
<p>Once you open that file, you&#8217;ll see it&#8217;s very basic and if you&#8217;re playing with Magento&#8217;s code, you should have no problem making the necessary changes there.  But for reference, here&#8217;s the code block that needs to be altered:</p>
<pre>&lt;connection&gt;
   &lt;host&gt;&lt;![CDATA[localhost]]&gt;&lt;/host&gt;
   &lt;username&gt;&lt;![CDATA[database_username]]&gt;&lt;/username&gt;
   &lt;password&gt;&lt;![CDATA[database_password]]&gt;&lt;/password&gt;
   &lt;dbname&gt;&lt;![CDATA[database_name]]&gt;&lt;/dbname&gt;
   &lt;active&gt;1&lt;/active&gt;
&lt;/connection&gt;</pre>
<p>Make sure to keep the structure in place there.  only change the values within the CDATA brackets.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.knowmagento.com/change-mysql-database-settings/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Here&#8217;s how I prefer to install Magento via SSH</title>
		<link>http://www.knowmagento.com/heres-how-i-prefer-to-install-magento-via-ssh/</link>
		<comments>http://www.knowmagento.com/heres-how-i-prefer-to-install-magento-via-ssh/#comments</comments>
		<pubDate>Fri, 16 Jan 2009 18:12:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Installation]]></category>

		<guid isPermaLink="false">http://knowmagento.com/?p=16</guid>
		<description><![CDATA[The following assumes an installation version of 1.2.0.  It also makes the assumption that you do not want your installation to live in a folder named &#8216;magento,&#8217; but rather your web root folder. SSH into your server and navigation to your web root folder.  Type the following commands: wget http://www.magentocommerce.com/downloads/assets/1.2.0/magento-1.2.0.tar.gz tar -zxvf magento-1.2.0.tar.gz cd magento mv [...]]]></description>
			<content:encoded><![CDATA[<p>The following assumes an installation version of 1.2.0.  It also makes the assumption that you do not want your installation to live in a folder named &#8216;magento,&#8217; but rather your web root folder.</p>
<p>SSH into your server and navigation to your web root folder.  Type the following commands:</p>
<pre>wget <a href="http://www.magentocommerce.com/downloads/assets/1.2.0/magento-1.2.0.tar.gz">http://www.magentocommerce.com/downloads/assets/1.2.0/magento-1.2.0.tar.gz</a>
tar -zxvf magento-1.2.0.tar.gz
cd magento
mv * ../
mv .htaccess ../
cd ../
chmod o+w var var/.htaccess app/etc
chmod -R o+w media 
rm -rf magento</pre>
<p>Chances are you&#8217;ll need to use Magento Connect, so you might as well set that up to work properly now:</p>
<pre>find . -type d -exec chmod 777 {} \;
find . -type f -exec chmod 644 {} \;</pre>
<p>That&#8217;s it.  Now you&#8217;ll need to navigate to your web root folder from your browser and get the rest setup.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.knowmagento.com/heres-how-i-prefer-to-install-magento-via-ssh/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Simple querying</title>
		<link>http://www.knowmagento.com/simple-querying/</link>
		<comments>http://www.knowmagento.com/simple-querying/#comments</comments>
		<pubDate>Thu, 15 Jan 2009 17:14:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Data Model]]></category>

		<guid isPermaLink="false">http://knowmagento.com/?p=10</guid>
		<description><![CDATA[Since Magento uses an EAV (Entity Attribute Value) data model, raw SQL queries are (for most practical purposes) out the window.  Therefore, this is a typical method of grabbing the collection of objects you are searching for: $products = Mage::getModel('catalog/product')-&#62;getCollection(); $products-&#62;addAttributeToFilter('sku', '1234'); $products-&#62;addAttributeToSelect('*'); $products-&#62;load(); foreach ($products as $_product) {     print_r($_product-&#62;getData()); } There are also [...]]]></description>
			<content:encoded><![CDATA[<p>Since Magento uses an EAV (Entity Attribute Value) data model, raw SQL queries are (for most practical purposes) out the window.  Therefore, this is a typical method of grabbing the collection of objects you are searching for:</p>
<pre>$products = Mage::getModel('catalog/product')-&gt;getCollection();
$products-&gt;addAttributeToFilter('sku', '1234');
$products-&gt;addAttributeToSelect('*');
$products-&gt;load();
foreach ($products as $_product) {
    print_r($_product-&gt;getData());
}</pre>
<p>There are also a handful of conditional config options for addAttributeFilter() that can be found here:</p>
<p><a href="http://docs.magentocommerce.com/Varien/Varien_Data/Varien_Data_Collection_Db.html#_getConditionSql">http://docs.magentocommerce.com/Varien/Varien_Data/Varien_Data_Collection_Db.html#_getConditionSql</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.knowmagento.com/simple-querying/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

