<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Snipplr</title>
    <description>Recent snippets posted on Snipplr.com</description>
    <link>https://snipplr.com/</link>
    <lastBuildDate>Wed, 10 Jun 2026 20:00:53 +0000</lastBuildDate>
    <item>
      <title>(MySQL) Delete &amp; Recreate a table quickly with mySQL - TheJasonParker</title>
      <link>https://snipplr.com/view/56985/delete--recreate-a-table-quickly-with-mysql</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 21 Jul 2011 21:41:41 UTC</pubDate>
      <guid>https://snipplr.com/view/56985/delete--recreate-a-table-quickly-with-mysql</guid>
    </item>
    <item>
      <title>(MySQL) Drop a table if it exists with mySQL - TheJasonParker</title>
      <link>https://snipplr.com/view/56980/drop-a-table-if-it-exists-with-mysql</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 21 Jul 2011 20:50:34 UTC</pubDate>
      <guid>https://snipplr.com/view/56980/drop-a-table-if-it-exists-with-mysql</guid>
    </item>
    <item>
      <title>(MySQL) Restore MySQL database in WampServer - TheJasonParker</title>
      <link>https://snipplr.com/view/52323/restore-mysql-database-in-wampserver</link>
      <description>&lt;p&gt;Go to the Windows command line by going to Start -&gt; Run and typing in cmd.&#13;
&#13;
You need to change directory to the MySQL bin directory. On my version, the directory is c:\wamp\bin\mysql\mysql4.1.22\bin.&#13;
&#13;
Therefore, the command to change to this directory is:&#13;
cd wamp\bin\mysql\mysql4.1.22\bin&#13;
&#13;
Put the MySQL dump (SQL file) into the above directory&#13;
&#13;
Create the new database in phpmyAdmin (or on the command line)&#13;
&#13;
The actual restore command is slightly different to normal (see below).&#13;
&#13;
Note that is says mysql.exe rather than the normal mysql.&#13;
When it asks you for a password, just hit enter. There is no password associated with the database that you created (unless you prefer to have one. But as it is local, there is no need).&lt;/p&gt;</description>
      <pubDate>Tue, 19 Apr 2011 21:58:12 UTC</pubDate>
      <guid>https://snipplr.com/view/52323/restore-mysql-database-in-wampserver</guid>
    </item>
    <item>
      <title>(MySQL) Excuting sql files from Linux shell - TheJasonParker</title>
      <link>https://snipplr.com/view/47857/excuting-sql-files-from-linux-shell</link>
      <description>&lt;p&gt;Ftp your *.sql file to the (remote) machine, login via SSH and then go to the directory where your sql file is and run this code.&lt;/p&gt;</description>
      <pubDate>Tue, 25 Jan 2011 23:34:46 UTC</pubDate>
      <guid>https://snipplr.com/view/47857/excuting-sql-files-from-linux-shell</guid>
    </item>
    <item>
      <title>(MySQL) Restoring a backup in Magento - TheJasonParker</title>
      <link>https://snipplr.com/view/47621/restoring-a-backup-in-magento</link>
      <description>&lt;p&gt;Wrap these two sets of commands around your sql backup if it hasn't come from a  backup from the Magento admin interface (Magento adds this).&#13;
&#13;
This stops foreign key checks and then restarts them.&#13;
&#13;
The /*!40101 ---- */ code around the SET commands asks "If this version of mySQL is 4.1.1 or newer then run the SET command else do nothing." Older versions will not understand the statement.&#13;
&#13;
This allows for easier  compatibility with other versions of mySQL.&lt;/p&gt;</description>
      <pubDate>Fri, 21 Jan 2011 02:33:43 UTC</pubDate>
      <guid>https://snipplr.com/view/47621/restoring-a-backup-in-magento</guid>
    </item>
    <item>
      <title>(MySQL) Cleanly delete all categories - TheJasonParker</title>
      <link>https://snipplr.com/view/46993/cleanly-delete-all-categories</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 12 Jan 2011 23:59:02 UTC</pubDate>
      <guid>https://snipplr.com/view/46993/cleanly-delete-all-categories</guid>
    </item>
    <item>
      <title>(MySQL) Disable products by category - TheJasonParker</title>
      <link>https://snipplr.com/view/46982/disable-products-by-category</link>
      <description>&lt;p&gt;After the MySQL above has run â€“ youâ€™ll need to let Magento take the reigns back a little to update the category indexes, this is quite straightforward, but a little time consuming.&#13;
&#13;
Login to your admin and go to System &gt; Cache Management, the select Rebuild Catalog Index&lt;/p&gt;</description>
      <pubDate>Wed, 12 Jan 2011 21:57:26 UTC</pubDate>
      <guid>https://snipplr.com/view/46982/disable-products-by-category</guid>
    </item>
    <item>
      <title>(MySQL) Disable products by sku - TheJasonParker</title>
      <link>https://snipplr.com/view/46981/disable-products-by-sku</link>
      <description>&lt;p&gt;You'll first need to find the attribute_id value for 'status' for your Magento installation and replace 273 in this example.&#13;
&#13;
The easiest way to tell is if you go into:&#13;
&#13;
Admin &gt; Catalog &gt; Attributes &gt; Manage Attributes&#13;
&#13;
Then in the â€œAttribute Codeâ€ box, enter â€œstatusâ€ then press â€œSearchâ€. Click the attribute result â€œstatusâ€ â€“ then look at the digits at the very end of the URL â€¦&#13;
&#13;
catalog_product_attribute/edit/attribute_id/XXX/&#13;
&#13;
In the code below (to be run via command line MySQL or phpMyAdmin), just replace %SKU% with your SKU identifier and use % as a wildcard or _ as a single character wildcard.&#13;
&#13;
This will obviously apply to any other attribute, so just change the code as necessary.&#13;
&#13;
enabled = 1&#13;
disabled = 2&#13;
&#13;
After the MySQL above has run â€“ youâ€™ll need to let Magento take the reigns back a little to update the category indexes, this is quite straightforward, but a little time consuming.&#13;
&#13;
Remove this line to disable all...&#13;
&#13;
AND cpe.sku LIKE '%SKU%'&#13;
&#13;
Login to your admin and go to System &gt; Cache Management, the select Rebuild Catalog Index&lt;/p&gt;</description>
      <pubDate>Wed, 12 Jan 2011 21:52:52 UTC</pubDate>
      <guid>https://snipplr.com/view/46981/disable-products-by-sku</guid>
    </item>
  </channel>
</rss>
