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!

Tagged with:
Posted in CakePHP, Database, PHP

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

Quote of the day: Reputation…

If in doubt, soft-delete (active=0) – disc space is cheap, reputation is not. from the comments on The irony of Model::deleteAll()

Posted in CakePHP, Database, Quote Of The Day

Little Bob Tables

from the ever excellent xkcd.com

Posted in Database, Funny, Web Development

Quote of the day: The None Commital Comment

This is a sentence in a comment to a message ridiculing a cryptic database format. This is the second sentence in a comment to a message ridiculing a cryptic database format. This is the third sentence in a comment to

Posted in Database, Quote Of The Day

SQL: Why = NULL Doesn’t Work in a Where Clause

This one has puzzled me ever since I got into SQL* Why doesn’ this work as expected: SELECT * FROM table WHERE field=NULL Enlightenment! Thanks to Philip Greenspun for providing the answer: What is happening here is that any expression

Posted in Database