<?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>Fri, 24 May 2013 21:28:55 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Till Klampaeckel's Blog: Zend Framework: Writing an IN-Clause with Zend_Db]]></title>
      <guid>http://www.phpdeveloper.org/news/15612</guid>
      <link>http://www.phpdeveloper.org/news/15612</link>
      <description><![CDATA[<p>
In <a href="http://till.klampaeckel.de/blog/archives/129-Zend-Framework-Writing-an-IN-Clause-with-Zend_Db.html">a new post</a> to his blog <i>Till Klampaeckel</i> looks at something the Zend Framework's Zend_Db component dosen't seem to support - an "IN" on a fetchAll - and how he worked around it.
</p>
<blockquote>
The IN-clause is only supported when I wrap my statement with Zend_Db_Select, which is something I rarely do. Part of the reason is that I still don't feel comfortable writing my SQL in a DSL which doesn't really do anything besides wrapping a string into an object and IMHO it doesn't add to readability either. And the other reason is that I don't plan to run this import against any other database than MySQL. Which is why I don't see the need for abstraction either.
</blockquote>
<p>
He shows some failing code where the IN isn't populated correctly when an array is passed in and the warnings that come with it. He solution's pretty simple, though - rewrite the query string before sending it with the correct number of bind locations ("?") for the number of parameters. In the comments, other approaches are suggested including using a simple select() call or tricking the bindings with a special kind of array. 
</p>]]></description>
      <pubDate>Tue, 21 Dec 2010 13:16:07 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Utilizing the LIMIT Clause with the Active Record Pattern]]></title>
      <guid>http://www.phpdeveloper.org/news/12245</guid>
      <link>http://www.phpdeveloper.org/news/12245</link>
      <description><![CDATA[<p>
DevShed continues their series on the Active Record pattern in PHP with <a href="http://www.devshed.com/c/a/PHP/Utilizing-the-LIMIT-Clause-with-the-Active-Record-Pattern/">this new article</a> implementing the LIMIT statement on your abstraction class.
</p>
<blockquote>
In its current version, it'll be able to accomplish only a few basic database operations tasks. Therefore, this fifth article of the series will be focused on enabling the class to fetch database rows by using the LIMIT clause.
</blockquote>
<p>
They <a href="http://www.devshed.com/c/a/PHP/Utilizing-the-LIMIT-Clause-with-the-Active-Record-Pattern/2/">add the LIMIT clause</a> as a part of its own function and its own SQL statement. You define the number of rows to fetch, the table to fetch it from and the offset to start from. The SQL is passed off to their fetchRow statement and the results are returned in an array.
</p>]]></description>
      <pubDate>Tue, 31 Mar 2009 12:58:35 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: The LIKE Clause and the Active Record Pattern]]></title>
      <guid>http://www.phpdeveloper.org/news/12197</guid>
      <link>http://www.phpdeveloper.org/news/12197</link>
      <description><![CDATA[<p>
DevShed continues their look at the Active Record pattern with <a href="http://www.devshed.com/c/a/PHP/The-LIKE-Clause-and-the-Active-Record-Pattern">the next part</a> of their seven part series - extending their MySQL class even further.
</p>
<blockquote>
In its current incarnation, this class's functionality is limited, regardless of its decent level of SQL abstraction. Therefore, in this fourth part of the series I'm going to enhance it by making it capable of working with LIKE clauses in a straightforward way. 
</blockquote>
<p>
They look at using LIKE to match values in various columns of the tables and add in a fetchLike method that lets you specify the column to search, the pattern to match on and the table to search in.
</p>]]></description>
      <pubDate>Tue, 24 Mar 2009 12:07:39 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Chris Shiflett's Blog: Zend Framework License]]></title>
      <guid>http://www.phpdeveloper.org/news/5239</guid>
      <link>http://www.phpdeveloper.org/news/5239</link>
      <description><![CDATA[<p>
<i>Chris Shiflett</i> has some <a href="http://shiflett.org/archive/227">good news</a> for all of the Zend Framework fans out there - the license that it's under is now compatible with the GPL.
</p>
<quote>
<i>
This means you can use the ZF for your own GPL-licensed PHP project. The big change is the removal of the advertising clause: 'Redistributions of any form whatsoever must retain the following acknowledgment: "This product includes the Zend Framework, freely available at http://www.zend.com/"'
</i>
</quote>
<p>
<i>Chris</i> notes also that it's a <a href="http://shiflett.org/archive/227">welcome change</a> over to this pre-existing license to reduce the number of licenses that companies would have to change/evaluate.
</p>]]></description>
      <pubDate>Wed, 26 Apr 2006 15:46:59 -0500</pubDate>
    </item>
  </channel>
</rss>
