<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Wed, 19 Jun 2013 01:05:26 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[ProDevTips.com: MySQL replication in PHP - on the same machine]]></title>
      <guid>http://www.phpdeveloper.org/news/16861</guid>
      <link>http://www.phpdeveloper.org/news/16861</link>
      <description><![CDATA[<p>
ProDevTips.com has a new tutorial posted today sharing <a href="http://www.prodevtips.com/2011/09/14/mysql-replication-in-php-on-the-same-machine/">a database replication script</a> they've put together to keep two databases in sync.
</p>
<blockquote>
After reading up on MySQL replication for a bit I realized that it would go quicker to simply write something in PHP that would sync a subset of tables in one database to exact copies of the same tables in another. Note that the code/SQL [in the example] only works if you replicate from one database to another on the same machine since the main thing here are SQL queries that contain operations/look ups on two databases in the same query.
</blockquote>
<p>
He includes the code to do the fetch on certain tables (based on a unique key), pushes them into an array and exports them back out into another table. There's also a modification included that makes it work on tables without an auto-increment column.
</p>]]></description>
      <pubDate>Thu, 15 Sep 2011 09:48:14 -0500</pubDate>
    </item>
  </channel>
</rss>
