<?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, 12 Feb 2012 21:05:53 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Rob Allen's Blog: One-to-Many Joins with Zend_Db_Table_Select]]></title>
      <guid>http://www.phpdeveloper.org/news/17515</guid>
      <link>http://www.phpdeveloper.org/news/17515</link>
      <description><![CDATA[<p>
<i>Rob Allen</i> has a tip for the Zend Framework users out there using the Zend_Db module to connect to their database resources - how to do a <a href="http://akrabat.com/zend-framework/one-to-many-joins-with-zend_db_table_select/">one to many join</a> with the help of Zend_Db_Table_Select (easier than it sounds).
</p>
<blockquote>
Let's say that you want to set up a one-to-many relationship between two tables: Artists and Albums because you've refactored my <a href="http://akrabat.com/zend-framework-tutorial">ZF1 tutorial</a>. [...] Assuming you're using Zend_Db_Table, the easiest way is to turn off the integrity check and do a join in a mapper or table method.
</blockquote>
<p>
He includes a few lines of source to illustrate, calling the "setIntegrityCheck" value to "false" to tell ZF not to worry about the additional join value over to the artists table. The result is a new column value with the artist's name instead of just the ID.
</p>]]></description>
      <pubDate>Wed, 08 Feb 2012 09:28:20 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Gonzalo Ayuso's Blog: How to protect from SQL Injection with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17514</guid>
      <link>http://www.phpdeveloper.org/news/17514</link>
      <description><![CDATA[<p>
In a recent post to his blog, <i>Gonzalo Ayuso</i> shares a few tips on <a href="http://gonzalo123.wordpress.com/2012/02/06/how-to-protect-from-sql-injection-with-php/">preventing SQL injection</a> attacks on your applications.
</p>
<blockquote>
Security is a part of our work as developers. We need to ensure our applications against malicious attacks. SQL Injection is one of the most common possible attacks. Basically SQL Injection is one kind of attack that happens when someone injects SQL statements in our application. You can find a lot of info about SQL Injection attack. Basically you need to follow the security golden rule: "Filter input, Escape output".
</blockquote>
<p>
He advocates the use of the PDO abstraction layer to filter out a lot of the issues. Using its prepared statements, you can easily strip out things that just adding slashes to user input wouldn't prevent. He also includes a reminder about database permissions - allowing only certain users the ability to, for example, delete can help provide one more level of security (in other words, don't use a "super user" in production).
</p>]]></description>
      <pubDate>Wed, 08 Feb 2012 08:07:05 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Brian Swan's Blog: Using SQL Azure Federations via PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17423</guid>
      <link>http://www.phpdeveloper.org/news/17423</link>
      <description><![CDATA[<p>
<i>Brian Swan</i> has a new post to his blog about <a href="http://blogs.msdn.com/b/silverlining/archive/2012/01/18/using-sql-azure-federations-via-php.aspx">using Azure Federations</a> in your PHP applications:
</p>
<blockquote>
In a nutshell, <a href="http://social.technet.microsoft.com/wiki/contents/articles/2281.federations-building-scalable-elastic-and-multi-tenant-database-solutions-with-sql-azure.aspx">SQL Azure Federations</a> introduces an abstraction layer for the <a href="http://en.wikipedia.org/wiki/Sharding">sharding</a> of SQL Azure databases. The value in federations lies in your ability to have elastic scalability of the database layer of your application (to match the elastic scalability of the rest of your application when it's running in the cloud). And, one nice thing about the way federations work is that nearly everything can be done with simple SQL commands. Of course, that means that using SQL Azure Federations via PHP should be easy. So in this post, I'll introduce you to SQL Azure federations by showing you how to use them via PHP.
</blockquote>
<p>
He uses the <a href="http://www.microsoft.com/download/en/details.aspx?id=20098">SQL Server drivers</a> to make the connection to the Azure instance and, based on his included code, creates a federation and tables inside it. 
 He also shows how to insert data into these tables, split up a federation, insert data after this split and how to query a federation member with the filtering on or off.
</p>]]></description>
      <pubDate>Fri, 20 Jan 2012 08:31:46 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Developer Drive: Building a PHP Ad Tracker: Creating the Database Tables]]></title>
      <guid>http://www.phpdeveloper.org/news/17400</guid>
      <link>http://www.phpdeveloper.org/news/17400</link>
      <description><![CDATA[<p>
On Developer Drive today there's a new post (the first in a series) from <i>Gerald Hanks</i> about building an ad tracker in PHP. In <a href="http://www.developerdrive.com/2012/01/building-a-php-ad-tracker-creating-the-database-tables/">this first part</a> he sets up some of the background - the database that will hold the tracker information.
</p>
<blockquote>
Banner ads for services related to the web site owner's industry allow customers to view products that tie into the site owner's core business. In exchange, the web site owner can charge the banner ad owner for every impression (banner ad appearance) or click-through (when a user clicks the banner ad). In order to build a banner ad management system, we must first create the database tables that will hold the ad information, the client data and the activity schedule for each ad.
</blockquote>
<p>
He includes the SQL you'll need to create a few tables - the tracking table for the ads themselves (their metadata), the clients table to handle the groups wanting the ads and the activity table to track views and click-throughs.
</p>]]></description>
      <pubDate>Mon, 16 Jan 2012 12:48:30 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Ulf Wendel's Blog: PHP mysqli quickstart is online!]]></title>
      <guid>http://www.phpdeveloper.org/news/17392</guid>
      <link>http://www.phpdeveloper.org/news/17392</link>
      <description><![CDATA[<i>Ulf Wendel</i> has a new post to his blog pointing out <a href="http://blog.ulf-wendel.de/2012/php-mysqli-quickstart-is-online/">the new mysqli quickstart</a> that's been <a href="http://docs.php.net/manual/en/mysqli.quickstart.php">added to the PHP manual</a>.
</p>
<blockquote>
New in the PHP manual: a <a href="http://docs.php.net/manual/en/mysqli.quickstart.php">mysqli quickstart</a>. You are new to PHP but you know how to code, you know SQL, you know relational databases and MySQL? Then, I hope, this is for you. All you need is a quick overview on the concepts? The rest is in the reference section! Here you go.
</blockquote>
<p>It includes sections on:</p>
<ul>
<li><a href="http://docs.php.net/manual/en/mysqli.quickstart.connections.php">making connections</a>
<li><a href="http://docs.php.net/manual/en/mysqli.quickstart.statements.php">executing statements</a>
<li><a href="http://docs.php.net/manual/en/mysqli.quickstart.stored-procedures.php">stored procedures</a>
<li><a href="http://docs.php.net/manual/en/mysqli.quickstart.multiple-statement.php">multiple statements</a>
</ul>]]></description>
      <pubDate>Fri, 13 Jan 2012 12:13:25 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Writing Custom Session Handlers]]></title>
      <guid>http://www.phpdeveloper.org/news/17319</guid>
      <link>http://www.phpdeveloper.org/news/17319</link>
      <description><![CDATA[<p>
On PHPMaster.com today there's a new post showing you how to <a href="http://phpmaster.com/writing-custom-session-handlers/">write custom session handlers</a> - in their case, a database-based option that can span across multiple servers/services.
</p>
<blockquote>
Sessions are a tool which helps the web programmer overcome the stateless nature of the internet. You can use them to build shopping carts, monitor visits to a website, and even track how a user navigates through your application. PHP's default session handling behavior can provide all you need in most cases, but there may be times when you want to expand the functionality and store session data differently. This article will show you how the default functionality works and then goes on to show you how override it to provide a custom solution.
</blockquote>
<p>
They introduce how sessions are stored normally (based on the save path) and what the serialized contents of it would look like. They show you how to take this, normally stored on the local file system, and change it to be written to a "session" table in a MySQL database (via <a href="http://php.net/pdo">PDO</a>). It includes reading, writing, updating and some garbage collection to clean out old values from the table.
</p>]]></description>
      <pubDate>Thu, 29 Dec 2011 09:41:25 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Smashing Magazine: Create A Christmas Wish List With PHP (For Beginners)]]></title>
      <guid>http://www.phpdeveloper.org/news/17298</guid>
      <link>http://www.phpdeveloper.org/news/17298</link>
      <description><![CDATA[<p>
In <a href="http://coding.smashingmagazine.com/2011/12/22/create-a-christmas-wish-list-with-php/">this new tutorial</a> Smashing Magazine shows you how to create a mini "Christmas List" application with PHP, HTML and CSS (and a little bit of database help) to display a list of what you or your family wants this holiday.
</p>
<blockquote>
'Tis the season to be jolly, and how much jollier could we make it than with a helpful Christmas wish list crafted for your family to ensure that you get maximum presentage this holiday? In this article, we will focus on creating a very simple system that allows you to add gift ideas to a Web page, and for your family (or whoever) to view the list.
</blockquote>
<p>
They walk you through the setup of the basic PHP file structure, the HTML template for the list output, CSS to make it look nice and the actual PHP backend - working with a MySQL database to pull out product information and use a simple login method.
</p>]]></description>
      <pubDate>Fri, 23 Dec 2011 10:23:51 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[DevArticles.com: Singletons in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17218</guid>
      <link>http://www.phpdeveloper.org/news/17218</link>
      <description><![CDATA[<p>
On DevArticles.com today there's <a href="http://www.devarticles.com/c/a/PHP/Singletons-in-PHP/">a new tutorial</a> posted talking about one of the more popular design patterns, the Singleton, and how it can be implemented in PHP.
</p>
<blockquote>
Though in the past they enjoyed both popularity and a certain amount of prestige, without a doubt Singletons have progressively become one of the most evil and despicable villains in object-oriented design. Singletons earned their bad reputation for a reason: bringing them to life requires the programmer to deal at least with a static method. This is simply an elegant masquerade for creating a global access point (which in most cases is mutable as well) throughout an entire application. And we all know that global, mutable access is unquestionably a bad thing that must be avoided at all costs.
</blockquote>
<p>
In this first part (of two) of the series they introduce the Singleton pattern and show how, via an example of using a database adapter interface to work with a MySQL database, in a tightly coupled example. 
 In the second part of the series, they'll show how to break these apart using dependency injection.
</p>]]></description>
      <pubDate>Tue, 06 Dec 2011 10:17:33 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Developer Drive: PHP User Survey: Setting Variable Values and Reading from Tables]]></title>
      <guid>http://www.phpdeveloper.org/news/17189</guid>
      <link>http://www.phpdeveloper.org/news/17189</link>
      <description><![CDATA[<p>
The Developer Drive blog has the latest post in their "PHP User Survey" series focusing on <a href="http://www.developerdrive.com/2011/11/php-user-survey-setting-variable-values-and-reading-from-tables/">setting up admin functionality</a> for the poll managers to use.
</p>
<blockquote>
In Part I of this series, we started the process of creating user polls for a business web site. Part I gave the layout of the data layer and began the construction of the class file. In this part we will continue with adding methods to the class file that will enable the administrator to set the variable values and read from the database tables.
</blockquote>
<p>
Code is included for setting the poll and answer ID values (setters), grabbing the number of polls currently defined, finding the active ones and pulling out poll data along with its answers. If you need to catch up, you can find the other parts here: <a href="http://www.developerdrive.com/2011/11/creating-a-php-user-survey-database-tables-and-class-file-constructor/">part one</a>, <a href="http://www.developerdrive.com/2011/11/creating-a-php-user-survey-writing-to-database-tables/">part two</a>.
</p>]]></description>
      <pubDate>Wed, 30 Nov 2011 11:04:33 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Brian Swan's Blog: The SQL Server ODBC Driver for Linux is Available!]]></title>
      <guid>http://www.phpdeveloper.org/news/17180</guid>
      <link>http://www.phpdeveloper.org/news/17180</link>
      <description><![CDATA[<p>
As <i>Brian Swan</i> has mentioned in <a href="http://blogs.msdn.com/b/brian_swan/archive/2011/11/28/the-sql-server-odbc-driver-for-linux-is-available.aspx">his latest blog post</a>, the ODBC database driver for SQL Server on Linux has been released. This is a huge step forward for directly connecting linux-based systems (and programming languages) to this popular Microsoft product.
</p>
<blockquote>
The first beta release of the SQL Server ODBC Driver for Linux is available for download! As <a href="http://blogs.msdn.com/b/brian_swan/archive/2011/10/13/microsoft-announces-sql-server-odbc-driver-for-linux.aspx">announced in October</a>, the "Multiplatform Team" (a.k.a. the "MPlat Team") has released a preview version of a driver that will provide first-class access to SQL Server from applications running on Linux operating systems. The team is looking for feedback on this release to incorporate into their production-ready release, so try it out and let us know what you think.
</blockquote>
<p>
He links to a few resources about the release - <a href="http://blogs.technet.com/b/dataplatforminsider/archive/2011/11/28/available-today-preview-release-of-the-sql-server-odbc-driver-for-linux.aspx">more details</a>, a <a href="http://www.microsoft.com/download/en/details.aspx?id=28160">link to download the driver</a> and the <a href="http://msdn.microsoft.com/en-us/library/hh568451(SQL.110).aspx">official documentation</a>.
</p>]]></description>
      <pubDate>Tue, 29 Nov 2011 08:39:35 -0600</pubDate>
    </item>
  </channel>
</rss>

