<?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>Sun, 06 Jul 2008 16:57:33 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Mike Willbanks' Blog: PHP Performance Series: Maximizing Your MySQL Database]]></title>
      <guid>http://www.phpdeveloper.org/news/10443</guid>
      <link>http://www.phpdeveloper.org/news/10443</link>
      <description><![CDATA[<p>
<i>Mike Willbanks</i> has posted <a href="http://blog.digitalstruct.com/2008/06/18/php-performance-series-maximizing-your-mysql-database/">another part</a> in his "PHP performance" series today. In his <a href="http://www.phpdeveloper.org/news/9711">previous article</a>, he talked about caching techniques including things like opcode caching and database memory tables. This time he talks about getting the most out of your MySQL database.
</p>
<blockquote>
Application level SQL performance is much different than the performance of the SQL query itself but rather how it has been designed to work in the application. Many of the items I will be addressing in this area is designing your application to make less queries thus improving scalability and likely performance. However, performance does not always equal scalability as the same with scalability does not always equal performance.
</blockquote>
<p>
He looks at a few different topics like lazy connections, iterating queries, need-based selects, normalization and a few simple things that you can apply to every SQL your application uses to optimize it as much as possible.
</p>]]></description>
      <pubDate>Thu, 19 Jun 2008 12:01:24 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Harry Roberts' Blog: Manipulating PHP arrays with SQL]]></title>
      <guid>http://www.phpdeveloper.org/news/10250</guid>
      <link>http://www.phpdeveloper.org/news/10250</link>
      <description><![CDATA[<p>
<i>Harry Roberts</i> has a <a href="http://codeb.us/manipulating-php-arrays-with-sql">quick post</a> to his blog today showing a method he's come up with to handle PHP arrays from inside of SQL statements (a port of the JsonSQL library to PHP).
</p>
<blockquote>
Trent Richardson created a very small and simple JsonSQL library for JavaScript which allows you to run an extremely limited subset of SQL against a Json array/object. I quickly ported it over to PHP 5 and it works like a charm, although the syntax for the WHERE clause isn't exactly the same but the rest ported across properly.
</blockquote>
<p>
He's included some sample source code of it in action - selecting information out of an array of user information, once changing their order and the other grabbing a username. Complete source for the library is included too.
</p>]]></description>
      <pubDate>Thu, 22 May 2008 14:39:54 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Matthew Turland's Blog:  PHP 5.2 and SQL Server 2000 on Windows XP]]></title>
      <guid>http://www.phpdeveloper.org/news/10163</guid>
      <link>http://www.phpdeveloper.org/news/10163</link>
      <description><![CDATA[<p>
<i>Matthew Turland</i> has <a href="http://ishouldbecoding.com/2008/05/10/php-5-2-and-sql-server-2000-on-windows-xp">posted about</a> his experience working with a Windows XP system trying to get PHP 5.2 and SQL Server 2000 to play nicely together:
</p>
<blockquote>
Recently at work, I was tasked with finding a method to retrieve data from a third-party SQL Server 2000-based system into our own MySQL-based application. It's worth noting that both system are behind their own firewalls and I was trying to bear security in mind as I did this.
</blockquote>
<p>
Some highlights of his work included using <a href="http://www.citrix.com/English/ps2/products/product.asp?contentID=13972&ntef=hp_nav_US">GoToAssist</a> to get to the system, using <a href="http://sqlmanager.net/products/mssql/manager/">EMS SQL Manager</a> to work with the SQL server itself and some of the PHP code he "threw at it" to grab the info he needed from the database (with the PDO drivers).
</p>]]></description>
      <pubDate>Mon, 12 May 2008 12:09:42 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Martynas Jusevicius' Blog: Calculating great-circle distance in MySQL and Propel]]></title>
      <guid>http://www.phpdeveloper.org/news/10093</guid>
      <link>http://www.phpdeveloper.org/news/10093</link>
      <description><![CDATA[<p>
In a <a href="http://www.xml.lt/Blog/2008/05/01/Calculating+great-circle+distance+in+MySQL+and+Propel">new post</a> today, <i>Martynas Jusevicius</i> shows how to combine a little SQL magic with the <a href=http://propel.phpdb.org/">Propel</a> framework to fins the distance between two places:
</p>
<blockquote>
Eventually the simple distance formula that I have blogged about turned out to be too inaccurate, even for locations within city bounds. I needed to use a formula to calculate great-circle distance which takes into account that the Earth is a sphere.
</blockquote>
<p>
He includes the SQL to pull the data in the right format and the PHP code (using Propel) to reproduce it without having to write it by hand (complete with the bind variables to help with security and consistency).
</p>]]></description>
      <pubDate>Thu, 01 May 2008 16:08:27 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Maggie Nelson's Blog: NTILE() - easy way to generate tag clouds]]></title>
      <guid>http://www.phpdeveloper.org/news/10067</guid>
      <link>http://www.phpdeveloper.org/news/10067</link>
      <description><![CDATA[<p>
For the Oracle users out there looking for an easy way to pull those tags together and make a handy little cloud out of them, <i>Maggie Nelson</i> has <a href="http://www.objectivelyoriented.com/2008/04/ntile_easy_way_to_generate_tag.html">posted about</a> a simple Oracle function that can help - NTILE.
</p>
<blockquote>
For example, check out the documentation for the NTILE Function. Yeah, sounds kind of boring. What good could it be in the wonderful world of web development? After all, who manages employee or sales tables anymore... Answer: generating tag clouds. 
</blockquote>
<p>
Her SQL statement categorizes the tags for you automatically, dropping them in to "buckets" of font sizes. This makes it simple to loop through them (like with a foreach) and output your tags with a little help from some CSS. You can even specify how many buckets you want it to fill (how many different tag values to get and compare).
</p>
]]></description>
      <pubDate>Tue, 29 Apr 2008 13:44:01 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Christopher Jones' Blog: PHP 5.3 "NOWDOCS" make SQL escaping easier]]></title>
      <guid>http://www.phpdeveloper.org/news/9633</guid>
      <link>http://www.phpdeveloper.org/news/9633</link>
      <description><![CDATA[<p>
<i>Christopher Jones</i> has <a href="http://blogs.oracle.com/opal/2008/02/13#a269">posted about</a> an update to the development for PHP 5.3 that makes escaping SQL even easier in scripts - NOWDOCS.
</p>
<blockquote>
Escaping quotes or other meta characters in SQL can be painful unless you get lucky with your quoting style. [...] Even with PHP's "Heredoc" syntax something will need escaping, but with PHP 5.3's new "Nowdoc" syntax no escaping is needed.
</blockquote>
<p>
The only difference between HEREDOC and NOWDOC is that the initial keyword (like the first END in this statement: <<<'END' text here END;) that can make worrying about complex quoting rules a thing of the past.
</p>]]></description>
      <pubDate>Thu, 14 Feb 2008 11:18:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Stuart Herbert's Blog: More about Performance Tuning]]></title>
      <guid>http://www.phpdeveloper.org/news/9566</guid>
      <link>http://www.phpdeveloper.org/news/9566</link>
      <description><![CDATA[<p>
Based off of a <a href="http://www.phpdeveloper.org/news/9538">previous article</a> from <i>Mike Willbanks</i>, <i>Stuart Herbert</i> has posted some of his <a href="http://blog.stuartherbert.com/php/2008/01/31/more-about-performance-tuning/">own thoughts</a> on tuning and tweaking your applications for the best performance you can get out of them.
</p>
<blockquote>
There's some good advice in there, and I thought it'd be a good idea to quickly add a bit more detail about the separate approaches that Mike raises.
</blockquote>
<p>
He <a href="http://blog.stuartherbert.com/php/2008/01/31/more-about-performance-tuning/">goes over</a> the APC caching, memcache, the "gzip trick", the "Not Modified" header and optimized SQL statements.
</p>
<p>
He also mentions one thing that <i>Mike</i> didn't mention - a split between static files (no PHP needed) and their dynamic cousins. Having a more pure Apache (no PHP installed) can help give a minute jump in speed that, depending on the size of the site, could really add up from a user's perspective.
</p>]]></description>
      <pubDate>Tue, 05 Feb 2008 07:57:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Travis Swicegood's Blog: Repository Pattern in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/9087</guid>
      <link>http://www.phpdeveloper.org/news/9087</link>
      <description><![CDATA[<p>
In a <a href="http://www.travisswicegood.com/index.php/2007/11/20/repository_pattern_in_php">new post</a> to his blog, <i>Travis Swicegood</i> talks about design patterns, specifically the use of the <a href="http://martinfowler.com/eaaCatalog/repository.html">Repository</a> style in an application:
</p>
<blockquote>
Josh [Eichorn] argued at the time that dealing directly with the database was a better option. [...] His argument won me over, and until this past week I've viewed that as probably the most sane way to go. [...] Now, what started out as the simplest solution has morphed into this unrecognizable mishmash of SQL, code and convention.
</blockquote>
<p>
He <a href="http://www.travisswicegood.com/index.php/2007/11/20/repository_pattern_in_php">points out</a> some of the issues that this sort of approach can bring up and how the Repository patten can help to make it a bit more manageable. It makes it simple to add the parameters needed for the query (via filters). 
</p>]]></description>
      <pubDate>Wed, 21 Nov 2007 10:21:00 -0600</pubDate>
    </item>
  </channel>
</rss>
