News Feed
Sections
News Archive


Community Events
php|tek 2008 PHP Conference



feed this:

Internet Super Hero Blog:
Is PDOFETCH_UNIQUE broken by design?
0 comments :: posted Friday March 07, 2008 @ 10:25:00
voice your opinion now!

On the Internet Super Hero blog, there's a post that looks at how PDO is implemented in PHP and wonders if the PDO::FETCH_UNIQUE constant is broken (as something to fix before even considering the move to PDO2).

I spent quite a lot of time comparing the different behaviours of the various drivers in the hope I could find out how PDO drivers are supposed to work. The PDO documentation and the specification do not cover each and every detail. PDO really needs some love...

He picks out the FETCH_UNIQUE constant as one that needs a little work and tries to track down exactly what it's doing. One issue he found was that it requires combination with other flags to make the unique part of it work correctly (like FETCH_OBJ or FETCH_COLUMN). He works through several examples, both ones that apply the unique call and others that don't, comparing the results.

tagged with: pdo fetchunique unique broken testing results


PHPBuilder.com:
Pagination of Results on a Web Page
0 comments :: posted Wednesday October 04, 2006 @ 16:17:00
voice your opinion now!

PHPBuilder.com has another in their series of excerpts from the Sams Publishing book "PHP 5 in Practice" today - a look at paginating results on a website.

When creating browse or search functionality on a website, you many find that you end up with more data than the page can easily display at once. In these situations it makes for a better user experience to give users only a certain number of results and then present them with options to see the next and/or previous pages.

The code listing is slightly complex, but it does provide a good, clear look at how to paginate the values in an array. They also explain a bit about the two functions that make it possible - http_build_ query and array_chunk.

tagged with: php5 practice book excerpt pagination results php5 practice book excerpt pagination results


book database PEAR release pecl application mysql cakephp framework security releases zend developer conference PHP5 code ajax package job zendframework

All content copyright, 2008 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework