DevShed: Working with Prepared Queries with PDO Objects in PHP 5
619098
DevShed concludes their series looking at the use of PDO objects in PHP5 with this last tutorial focusing on the use of prepared queries in your PHP application.   In this last tutorial in the series I'm going to show you how to run prepared queries, but in this case we're going to include named parameters into them. Additionally, I'm going to take a quick look at some additional methods bundled with this extension. These new methods can be really useful for working with transactions, in case you want to use this feature with the database system of your choice.   They start with a simple approach to using prepared queries before moving on to an alternate method - binding parameters to the query via bindParam. They wrap up the article with a look at using transactions, both commits and rollbacks.
190663
Joshua Eichorn points out an interesting project in a new post to his blog today - quercus.   I found an interesting project, quercus that compiles PHP to Java Bytecode allowing it to run ontop of the Java Resin Application Server. It has a couple neat features, one being PHP6 compatible unicode support, the other being easy integration between Java and PHP code.   He gave it a shot and notes that the performance seems decent and allows you to compensate for some of the differences in the PHP API it supports and what you're using via a Java class. According to their site:   Quercus is Caucho Technology's 100% Java implementation of PHP 5 released under the Open Source GPL license. Quercus comes with many PHP modules and extensions like PDF, PDO, MySQL, and JSON. Quercus allows for tight integration of Java services with PHP scripts, so using PHP with JMS or Grails is a quick and painless endeavor.   It includes several extensions too, including the JSON library, APC, MySQL and Oracle support, and PDF functionality. Check out their Getting Started guide, documentation, or their wiki for more information.
150071
On his blog today, Mike Lively has posted about the work h's done to create a database extension for the popular unit testing software for PHP, PHPUnit.   For those that may not have read any of my previous postings on the subject the goal of this software is to extend the functionality of PHPUnit to allow using seed data to put a given database into a known state prior to executing each test. It also provides an easy mechanism to compare database contents with an expected dataset.   Mike has just completed the initial feature set for his project - more or less a port of DBUnit over to PHP. The post includes not only details about this initial release but also code that demonstrates its use. In his example, it's used to validate that a bank account has been created properly by comparng database information before and after the insert.
650296
In a post from PHP Magazine today, there's mention of an interesting discussion that was had at the latest NYPHP meeting concerning the accessing of the NDB Cluster native API directly from PHP.
396236
This month's issue of php|architect has been released and includes articles such as:  PHP5: Beyond the Objects The Ultimate PHP 5 Shopping Cart PHP and Databases Error Handling with PHP 5 and PEAR
347086
On CodePoets.co.uk, there's a new tutorial posted by David Goodwin showing how to use PHP with the PEAR MDB2 component to access your database backend.   While writing some PHP Training materials for Pale Purple, I thought I'd add an updated guide on PHP and database access. I've already done one on PEAR::DB, but PEAR::MDB2 is it's successor and has a slightly different API.... and as PEAR::DB is now deprecated, it's probably about time I rewrote it anyway.   David looks at what the MDB2 package is, how to install it, connecting to your database and including some error handling as well. He (thankfully) also touches on one of the most handy features of the package - the prepared statements and the security they can offer.
198996
Continuing on from the first part of the series looking at the use of Adapter objects, DevShed has posted part two today - using the Adapter objects along with Directory Iterators to integrate with a MySQL database.   Provided that you understand the basic concepts of the adapter pattern, in this final tutorial, I'll show you how to use it in conjunction with the "DirectoryIterator" class, bundled with PHP 5, and with a couple of MySQL wrappers as well.   They jump right in (as was said, assuming you read the previous article) to using the directory iterators and the adapters together to make a class that gets information about the files in a directory. They take this and show a sample use that's then transformed into a class capable of using the same logic on MySQL results.
568782
DevShed has posted the next-to-last (part four) of their series looking at destructors in PHP5 applications today. This time they focus on passing information back out of the destructors as the script is finishing.   In this fourth article of the series I'm going to teach you how perform this process when working with multiple objects (remember that you already learned how to achieve this using only one class instance).   They start simple, showing how to handle one object to give you a base to work from. They modify this to expand it out and show the management instead of three different user data objects.
318761
DevShed ramps up another new series today with this new article giving developers a look at working with object-oriented programming through the eyes of design patterns. It's another excerpt from the George Schlossnagle book "Advanced PHP Programming".   This chapter provides an overview of the advanced OO features now available in PHP. Some of the examples developed here will be used throughout the rest of this book and will hopefully serve as a demonstration that certain problems really benefit from the OO approach.   The article lays down the foundation for the more complex information to come. It introduces object-oriented programming briefly, and talks about some of the handy features of it - like inheritance, static attributes and methods.
104778
Latest PHPClasses.org Releases:Multi-Dimensional Array HandlerMySQL2JSONBBCode ParsersphpcompilerProcessingExponsor ModSimplePagingweb20vnRouterSStatusMagic ArraysqlExecmyAltCaptchaDynamic Methodpreg_magic
638724
Latest PHPClasses.org Releases:pop3-streamUserActionMySQLWrapperPHP AjaxOutput Buffering handlerSite Map GeneratorRandom HTML GeneratorPaginationsGoogle GraphProcess ImagesgCurlRobots_txtProgressODBC-ABMNewsletter QueueProgress ODBC ABM
676141
While attending Gunter Kniesel's "Aspect-Oriented Software Development" lecture yesterday it occured to me that it might be possible to (ab)use PHP 5's __autoload(), __call(), __get(), and __set() interceptors to facilitate Aspect-Oriented Programming with PHP.
193310
Here's what was popular in the PHP community one year ago today:onPHP5.com: Clickable, Obfuscated Email AddressesJacob Santos' Blog: PHP BlackjackThe Bakery: RESTful Web Services With CakePHPDeveloper.com: Developing a Ajax-driven Shopping Cart with PHP and PrototypeGreg Beaver's Blog: Mac OS X ships with security hole-laden PEAR - how to upgrade immediatelyNexen.net: English Articles and a Single Distribution ResourceJob Posting: Red Ventures Seeks Several LAMP Developers (Charlotte, NC)The Bakery: Checking for duplicate records (unique record)DevShed: The Basics of Abstract Factory Classes in PHP 5NewsForge.com: A DIY calendar control in PHPDevGuide.net: Dynamic Bitmap Graphics with PHP and GDRichard Heyes' Blog: Browser DetectionInternational PHP Magazine: Poll Question: Which is the Most Important Feature of PHP 5?Builder.au: Dynamic XML document construction with the PHP DOMCommunity News: PEAR Version 1.5.0 Released
733804
Continuing in their series looking at how to handle static data in a dynamic PHP application (see part one here), DevShed has posted the next piece in the puzzle, working with static properties in PHP5.   Provided that you already have an average background in using static methods with PHP 5, over the course of this second article of the series I'll dive a bit deeper into this interesting  topic and show you how to take advantage of static properties defined inside a given PHP class, in this manner completing, at least basically, the implementation of static data with PHP 5.   They start by reviewing the functionality from the previous part of the series and build on it, creating static properties within the class (user data in this case) and how to use it in a mini app to set and display the information.
480439
The PHPClasses.org website has posted their review of a Packt Publishing book covering PDO - "Learning PHP Data Objects" (by Dennis Poppel).   In Learning PHP Data Objects, the author, Dennis Popel, examines this new system and explains how to begin using PDO in development as a replacement for typical database drivers. The book is an excellent introduction to the data abstraction layer. It also provides essential insight into the inner workings of database interaction with PHP.   The review talks about the contents of the book, what PDO is/how it's used and how well the book hits the mark for its target audience.
698334
Popular posts from PHPDeveloper.org for the past week:The Bakery: Six New Articles/Tutorials PostedEvert Pot's Blog: PHP: Arrays vs. ObjectsDevArticles: Learning AJAXInternet Super Hero: PHP: mysqli_fetch_all()David Coallier's Blog: PHP Namespaces (Part 1: Basic usage & gotchas)I/O Reader: 15 Cool Things & 12 Things to Dislike About PHPProPHP Podcast: Newscast - August 16, 2007PHPBuilder.com: Dynamic XML with PHPSite News: Popular Posts for the Week of 08.17.2007PRADO Watch Blog: PRADO Watch: Interview With Timani Tunduwani - Why I Moved From CakePHP to PRADO
82198
Knut Urdalen shares a note about the latest issue of the International PHP Magazine - the December 2007 issue - that he has an article in.   The December issue of International PHP Magazine includes my latest article "Seamless AJAX with PRADO - An introduction to ActiveControls". In this article I discuss some AJAX design patterns and show you how to make use of them in AJAX enabled components that ships with the PRADO framework.   More information about this issue (and subscribing to the International PHP Magazine) can be found on this page of their site and details on the PRADO framework are over on the project's website.