Blog Archives

CakePHP: Subclassing Models

Spotted in the comments on the Bakery: App::Import (‘model’, ‘User’); class Seller extends User { var $name = ‘Seller’; } Thanks to Przemysław Sitek for this useful snippet! Advertisements

Tagged with:
Posted in CakePHP, Database, PHP

I tried realy hard to come up with a reason to post this. Oh look! PHP!

Posted in PHP

CakePHP Zebra Striped Tables

The following code sample will add an ‘altrow’ class to every alternative row in a table with a minumum overhead. The code produced is compatible with the default cake.generic.css stylesheet: <?php foreach ($upcoming_events as $i=>$event) { ?> <tr<?php echo ($i

Tagged with:
Posted in CakePHP, CSS, PHP

My Daily WTF

From Back up Windows SharePoint Services 3.0 by using built-in tools You can back up but you cannot restore a configuration database. O.o

Tagged with: , , , ,
Posted in Web Development

Quote of the Day: Valid Asshole

Usually, if you’re validating someone else’s code, it’s because you’re being an asshole. from

Posted in Quote Of The Day, Web Development

Quote of the Day: A Patently Bad Idea

Can you patent ideas? I would like to patent this concept. Then I will never let anyone use it ever again. From the comments over on The Daily WTF

Posted in Database, Quote Of The Day

PHP Sessions fail in IE if there is an underscore in the domain name

This one is a new one on me ( and I got bitten with it today 😦 ) ********************WARNING*********************** There’s a bug in Internet explorer in which sessions do not work if the name of the server is not a

Tagged with:
Posted in PHP, Web Development