News Feed
Jobs Feed
Sections

Recent Jobs

News Archive
feed this:

Havard Eide's Blog:
Iterators
August 06, 2008 @ 12:52:35

Havard Eide looks at another aspect of the Standard PHP Library in a new blog post today - iterators.

[It's] a set of classes in the SPL that implements various iterating patterns: ArrayIterator, AppendIterator, FilterIterator, LimitIterator and NoRewindIterator. Hopefully you'll get a idea of what these are capable of and that you can get some new ideas for your day-to-day tasks.

He breaks it down into example of each, explaining what they can be used for, how they work and a code example of each in action (with output). You can find more information in iterators and their functions in the SPL section of the manual.

0 comments voice your opinion now!
iterator tutorial array append filter limit norewind



PHPFreaks.com:
Basic Pagination
June 19, 2008 @ 08:47:56

A new tutorial has been posted on the PHPFreaks.com site today dealing with paginating your data (in their example, info from a database).

It makes way more sense to break up your list into page-sized chunks, and only query your database one chunk at a time. This drastically reduces server processing time and page load time, as well as gives your user smaller pieces of info to digest, so he doesn't choke on whatever crap you're trying to feed him. The act of doing this is called pagination.

They include the full script for those that want to jump right in and the detailed info in the rest of the tutorial for those that need a little more insight. The script gets a count of the results first then uses the LIMIT format for MySQL to restrict the number of rows returned each time and where to start those returned rows from.

1 comment voice your opinion now!
pagination tutorial mysql database limit


Markus Wolff's Blog:
ActiveRecord enhancements
September 11, 2006 @ 08:16:27

Markus Wolff finally got the time to work on a project he's developed but hasn't had the time to enhance - CWAC_ActiveRecord.

After two weeks I finally managed to find a bit of time to continue working on CWAC_ActiveRecord. Requested by my friend Arnaud was the setConnection() method, that allows to reuse existing PDO objects with CWAC_ActiveRecord. Before this, you could only pass a DSN with the config array and a new connection would always be created.

He also added limit() and orderby() methods to help narrow down your queries.

0 comments voice your opinion now!
activerecord ehancements cwac project setconnection limit orderby pdo activerecord ehancements cwac project setconnection limit orderby pdo


Tobias Schlitt's Blog:
Trakbacks on PEARWeb and PEAR Services_Trackback
February 15, 2006 @ 07:10:38

Tobias Schlitt has a new post today concerning the improvements that's been made to the PEAR::Services_Trackback package.

I finally found some time and improved the trackback handling on PEARWeb:

  • HTML entities in trackbacks are now decoded before using the bad-word-filter (and the list has been updated)
  • Only 3 trackbacks per 30 minutes will be accepted from a host from now.
  • If both of these criteria do not match, it uses DNSBL and SURBL mechanisms to check trackbacks additionally.

He comments on how it will work now with these improvements and the popularity that the package is garnering...

0 comments voice your opinion now!
php PEAR::Services_Trackback improvements bad word limit DNSBL SURBL php PEAR::Services_Trackback improvements bad word limit DNSBL SURBL



Community Events











Don't see your event here?
Let us know!


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

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