<?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>Thu, 04 Dec 2008 10:42:16 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Rubayeet Islam's Blog: MySQL Prepared Statements and PHP : A small experiment]]></title>
      <guid>http://www.phpdeveloper.org/news/11317</guid>
      <link>http://www.phpdeveloper.org/news/11317</link>
      <description><![CDATA[<p>
In a <a href="http://rubayeet.wordpress.com/2008/10/07/mysql-prepared-statements-and-php-experiment/">recent post</a> to his blog <i>Rubayeet Islam</i> compared the more traditional way of running a query in MySQL versus a prepared statement with the MySQLi extension.
</p>
<blockquote>
Consider a PHP-MySQL application where the information of 1000 users is being retrieved from the database by running a for loop [...] in each iteration, the first thing the MySQL engine does is to parse the query for syntax check. Then it sets up the query and runs it. Since the query remains unchanged during each iteration(except for the value of user_id), parsing the the query each time is definitely an overhead. In such cases use of prepared statements is most convenient.
</blockquote>
<p>
He explains what prepared statements are and some of the advantages around them and includes some benchmarking examples to show the differences - about a five second jump in favor of MySQLi.
</p>]]></description>
      <pubDate>Thu, 30 Oct 2008 11:13:58 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Internet Super Hero Blog: PDO_MYSQLND: The new features of PDO_MYSQL in PHP 5.3]]></title>
      <guid>http://www.phpdeveloper.org/news/10699</guid>
      <link>http://www.phpdeveloper.org/news/10699</link>
      <description><![CDATA[<p>
On the Internet Super Hero blog, they take <a href="http://blog.ulf-wendel.de/?p=193">a quick look</a> at what's new in the MySQL native driver version that will be included in the upcoming PHP version, PHP 5.3.
</p>
<blockquote>
PDO_MYSQLND is in the <a href="http://cvs.php.net/viewvc.cgi/php-src/">PHP CVS</a> repository at <a href="http://php.net/">php.net</a>: <a href="http://www.php.net/pdo_mysql">PDO_MYSQL</a> has been patched (PHP 5.3, PHP 6.0). Try out PDO_MYSQL with the MySQL native driver for PHP (mysqlnd). Its has new features. 
</blockquote>
<p>
They do a short recap of what the native driver libraries are all about and some of the advantages to using them. They look at some of the "memory tricks" supported by the driver and a look at the prepared statement and procedure support.
</p>]]></description>
      <pubDate>Mon, 28 Jul 2008 14:35:19 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Stefan Mischook's Blog: SQL insert statements in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/10642</guid>
      <link>http://www.phpdeveloper.org/news/10642</link>
      <description><![CDATA[<p>
<i>Stefan Mischook</i> has posted a <a href="http://www.killerphp.com/articles/sql-insert-statements-in-php/">new introductory video</a> for those just starting out with SQL in their PHP scripts - a look at using a (MySQL) database.
</p>
<blockquote>
I've finally released my first <a href="http://www.killerphp.com/videos/sql_statements_in_php.php">video on using SQL statements</a> in PHP pages. This is the next step after connecting to a MySQL database. I hope you find the videos useful.
</blockquote>
<p>
The video looks at the "big four" - insert, update, delete and select, but focuses on the select statements and how to use them with function like <a href="http://php.net/mysql_fetch_assoc">mysql_fetch_assoc</a> and <a href="http://php.net/mysql_fetch_array">mysql_fetch_array</a> to get the results out of your database. 
</p>]]></description>
      <pubDate>Mon, 21 Jul 2008 07:58:46 -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[DevShed: PHP Statements and Beginning Loops]]></title>
      <guid>http://www.phpdeveloper.org/news/8969</guid>
      <link>http://www.phpdeveloper.org/news/8969</link>
      <description><![CDATA[<p>
DevShed has posted the <a href="http://www.devshed.com/c/a/PHP/PHP-Statements-and-Beginning-Loops/">latest part</a> of their introduction to PHP series, this time focusing on one of the more useful features of the language - conditionals and loops.
</p>
<blockquote>
We discussed statements briefly in our last article and even got a sneak peek of an IF-statement. Sure I mean, the image was blurry, and the moment it saw us it ran off into the forest. But we saw it. Honest. So in this article, we're going to take a much closer look at PHP statements and even start learning about loops.
</blockquote>
<p>
They cover if statements (as mentioned) as well as introduce you to its companions, else and else if. The finish off the article with a brief look at one of the simpler loops, the <a href="http://www.devshed.com/c/a/PHP/PHP-Statements-and-Beginning-Loops/4/">for loop</a>.
</p>]]></description>
      <pubDate>Mon, 05 Nov 2007 09:34:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Charles Rowe's Blog: The Four Major Benefits of MySQLi]]></title>
      <guid>http://www.phpdeveloper.org/news/8078</guid>
      <link>http://www.phpdeveloper.org/news/8078</link>
      <description><![CDATA[<p>
<i>Charles Rowe</i> shares <a href="http://www.charlesrowe.com/2007/06/15/the-four-major-benefits-of-mysqli/">four reasons/benefits</a> he's come up with that should make you think about choosing MySQLi over the normal MySQL libraries for PHP for your application.
</p>
<blockquote>
There still seems to be a lot of confusion over the differences between the two extensions despite the length of time that mysqli has been in the wild. I wanted to briefly review the four major benefits of mysqli.
</blockquote>
<p>
Here's <a href="http://www.charlesrowe.com/2007/06/15/the-four-major-benefits-of-mysqli/">the list</a>
</p>
<ul>
<li>Prepared Statements
<li>Secure MySQL connections
<li>Multi query
<li>Object Oriented Interface
</ul>
<p>
He also includes a few more links to further information (besides the explanation for each of the topics listed above) including <a href="http://devzone.zend.com/node/view/id/686">an article</a> from the Zend Developer Zone and <a href="http://forge.mysql.com/wiki/Converting_to_MySQLi">a tutorial</a> covering making the switch to MySQLi.
</p>]]></description>
      <pubDate>Tue, 19 Jun 2007 11:03:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Raphael Stolt's Blog: Transforming data centered XML into SQL statements]]></title>
      <guid>http://www.phpdeveloper.org/news/7798</guid>
      <link>http://www.phpdeveloper.org/news/7798</link>
      <description><![CDATA[<p>
In <a href="http://raphaelstolt.blogspot.com/2007/05/transforming-data-centered-xml-into-sql.html">this new post</a> on <i>Raphael Stolt</i>'s blog, he shows a way that you can take XML that holds SQL information (in his example INSERTs and DELETEs) and transforms them into SQL statements via XSL stylesheets.
</p>
<blockquote>
A canny data import technique that emerged from praxis, while working on the import of data-centered XML resources, is utilitizing the abilities of Xslt. The generation of the required SQL statements actually only needs a simple Xsl stylesheet which might import for an PHP XSLTProcessor object or pass to the <a href="http://xmlsoft.org/XSLT/xsltproc.html">xsltproc</a> command line tool. Both further described approaches are based upon the libxslt library and are assuming the use of XSLT 1.0.
</blockquote>
<p>
He starts with an example bit of XML that has the XSL stylesheet at the top that will be used to transform the data and the information to perform inserts on several "partner" values in the XML below. Following this, he <a href="http://raphaelstolt.blogspot.com/2007/05/transforming-data-centered-xml-into-sql.html">creates</a> a PHP class to load the file and apply the stylesheet.
</p>
<p>
He also mentions a few different approaches to the same problem - XSLTProcessor class approach returning a single SQL string , xsltproc approach and the XSLTProcessor class approach using the ability to use PHP functions as XSLT functions.
</p>]]></description>
      <pubDate>Tue, 08 May 2007 10:27:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Vinu Thomas' Blog: Modifying your MySQL databases to be UTF-8 compliant]]></title>
      <guid>http://www.phpdeveloper.org/news/6982</guid>
      <link>http://www.phpdeveloper.org/news/6982</link>
      <description><![CDATA[<p>
There's a <a href="http://blogs.vinuthomas.com/2006/12/22/modifying-your-mysql-databases-to-be-utf-8-compliant/">quick tip</a> from <i>Vinu Thomas</i> on his blog for anyone having issues with UTF-8 data in a MySQL database (as accessed by PHP).
</p>
<blockquote>
Most of us have had problems with UTF-8 problems in PHP and MySQL. Here's how to modify your database and table to be UTF-8 compliant. Most of the time we do set the character set to utf8 but forget to set the collation set to utf8.
</blockquote>
<p>
He <a href="http://blogs.vinuthomas.com/2006/12/22/modifying-your-mysql-databases-to-be-utf-8-compliant/">includes both SQL statements</a> you'll need to make the transition - two ALTER statements that update the properties of a database and change the encoding on a specific table to UTF-8 compatibility.
</p>]]></description>
      <pubDate>Thu, 28 Dec 2006 07:47:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Jeff Moore's Blog: PDO versus MDB2]]></title>
      <guid>http://www.phpdeveloper.org/news/6975</guid>
      <link>http://www.phpdeveloper.org/news/6975</link>
      <description><![CDATA[<p>
In the constant pursuit of exploring what else is out there, <i>Jeff Moore</i> <a href="http://www.procata.com/blog/archives/2006/12/26/pdo-versus-mdb2/">took a look</a> at using PDO and MDB2 in some of his scripts and tried it out in a simple test program:
</p>
<blockquote>
I was just putting together a small test program and I thought I would try using PDO. I really haven't done anything serious with PDO, just try it a couple times. Unfortunately, this didn't work and it took me a few minutes to figure out why. Actually, I still don't know exactly why it doesn't work, but I did find a way to make it work.
</blockquote>
<p>
He <a href="http://www.procata.com/blog/archives/2006/12/26/pdo-versus-mdb2/">found PDO</a> slightly different to work with than what he was used to so he moved on to MDB2 to see how the same code would fare there. Things worked smoothly there, handling the prepared statements he wanted to use perfectly.
</p>]]></description>
      <pubDate>Wed, 27 Dec 2006 10:41:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Debugging and Performance]]></title>
      <guid>http://www.phpdeveloper.org/news/6761</guid>
      <link>http://www.phpdeveloper.org/news/6761</link>
      <description><![CDATA[<p>
In another part of their series of excerpts from the Zend PHP Certification Guide (from Zend), DevShed has posted <a href="http://www.devshed.com/c/a/PHP/Debugging-and-Performance/">this article</a> talking about debugging and performance issues and methods.
</p>
<blockquote>
Making mistakes is human, and so is fixing them. In your day-to-day programming adventures, it's inevitable to introduce bugs in your PHP code, especially when you're writing very complex applications with tens of thousands of lines of code spread across tens of files.
</blockquote>
<p>
In <a href="http://www.devshed.com/c/a/PHP/Debugging-and-Performance/">this article</a> they look at things like flattening if statements, spplitting single commands across multiple lines, and the difference between =, ==, and ===.
</p>]]></description>
      <pubDate>Thu, 23 Nov 2006 13:42:00 -0600</pubDate>
    </item>
  </channel>
</rss>
