Feed on

Category Archive for 'PHP'

PHP Pagination Class – Version 3

It’s been a while since the popular PHP pagination class has received any of my attention, so a few months ago I set out to re-write the class to be more up to date. This version takes advantage of both code and security updates as well as updates to PHP and MySQL. I’m also planning […]

Read Full Post »

PHP Pagination Class Updated – Version 2

Based on feedback (and the long time between updates), I’m releasing an updated version of the PHP pagination class. Changes No more SQL errors if using the class on a query with no results (although I fail to see the point of using it on an empty query anyway, but the bug is fixed) When […]

Read Full Post »

Narrow Minded

Recently I was checking out some code written many years ago by another developer, and as I was hacking it up to be re-used, I started wondering why he had decided to split up his lines of code so that they were very narrow. Comments, for example, that were a few sentences long ended up […]

Read Full Post »

Introduction to PHP’s Serialize Function

I was tinkering with a WordPress database the other day and was nosing around through some tables, looking for some statistical data which I never found, and noticed that a few of the tables were storing data in an unusual format (to me at least). Specifically one record I found looked like this: a:6:{s:5:”width”;i:250;s:6:”height”;i:323;s:14:”hwstring_small”;s:22:”height=’96′ width=’74′”;s:4:”file”;s:72:”/uploads/2008/04/wireframes7.jpg”;s:5:”sizes”;a:2:{s:9:”thumbnail”;a:3:{s:4:”file”;s:23:”wireframes7-150×150.jpg”;s:5:”width”;i:150;s:6:”height”;i:150;}s:6:”medium”;a:3:{s:4:”file”;s:23:”wireframes7-232×300.jpg”;s:5:”width”;i:232;s:6:”height”;i:300;}}s:10:”image_meta”;a:10:{s:8:”aperture”;i:0;s:6:”credit”;s:0:”";s:6:”camera”;s:0:”";s:7:”caption”;s:0:”";s:17:”created_timestamp”;i:0;s:9:”copyright”;s:0:”";s:12:”focal_length”;i:0;s:3:”iso”;i:0;s:13:”shutter_speed”;i:0;s:5:”title”;s:0:”";}} […]

Read Full Post »

PHP Pagination Class

Some of you have asked for more examples of the PHP pagination class I wrote, specifically the same examples I’m using here on the site. The database comes from MySQL’s free example databases available at http://dev.mysql.com/doc/#sampledb (my example uses the world database). The two examples I use here can be seen at http://www.catchmyfame.com/paginator/example.php and http://www.catchmyfame.com/paginator/example-form.php. […]

Read Full Post »

Older Posts »