..check it out the Foldi blog for updates on work, clients, etc...

Paginating results from multiple tables using CakePHP

December 29th, 2009

What you get from the CakePHP pagination helper is reason enough to use the CakePHP framework. However, what happens if you need to paginate results from multiple tables? I’ve set up a working demo to show an approach and have provided project files for download. In the app folder of the project files you’ll find a paginatedjoins.sql file to set up your tables. Remember to provide your own credentials in your config/database.php file.

Read the rest of this entry »

Queries across multiple databases with CakePHP

November 27th, 2009

Most CakePHP documentation assumes you’ll be working with tables in the same database. However, how do you query related data when your tables are spread across multiple databases? Fortunately, CakePHP makes this a breeze with the CakePHP model’s ‘useDbConfig’ variable and a little table prefix manipulation I picked up from this post in the CakePHP Google group.

Before the detailed explanation, you can view a working demo. Please note, this demo assumes you have basic knowledge of Cake models and associations.

Read the rest of this entry »

Sticky pixels installation #2

November 21st, 2009

My Post-it interpretation of Shepard Fairey’s Obama campaign poster poster was such fun that I undertook another Post-it piece. This one is 10 feet high by 7.5 feet wide and used 12 different colors from 6 different stacks of Post-its for a total of 828 sheets. The black pixels are of course using the wall color. It took around 10 hours to put together. Click the photos below for more detail.

This time I won’t give away who it is. Can you guess? If so, please leave a comment below. Hint: The image is based on a GQ cover.

Pixel art Post-its 1 of 5


Pixel art Post-its 2 of 5

Read the rest of this entry »

1,350 Post-its later and we’re having breakfast with Obama (Sticky pixels installation #1)

September 30th, 2009

So what do you do with a bunch of left over Post-its? Write a novel? Make a paper slinky? You could render the Shepard Fairey Obama print. I did this before a house warming in our new apartment. Many ideas were suggested for further Post-it work. We still have a bit of wall space left…so stay tuned.

Post-its make 3 inch pixels

close-up

Basic search with CakePHP Part 2 – search criteria

June 28th, 2009

This is part 2 of the Basic search with CakePHP where we’ll present the search criteria in a more user-friendly way. The files here build on part 1.

Here’s the working example.

Read the rest of this entry »