Databasen - Revisited

Piers Cawley pdcawley at bofh.org.uk
Thu Oct 19 15:25:53 BST 2006


Andy Armstrong <andy at hexten.net> writes:

> On 19 Oct 2006, at 11:12, Peter Corlett wrote:
>> While we're on about terrible not-quite-open source products,
>> Movable Type
>> is a right crock too. And it also has some rather quaint ideas as to
>> what a
>> database is. It doesn't mark primary keys with SERIAL, for
>> example. I assume
>> that they manually insert NEXTVAL('mt_blah_id'), and probably in a
>> way prone
>> to race conditions and ignoring errors if the few bits of an existing
>> installation I've had to debug is any guide.
>
> That's an alarmingly common idiom in badly written webby code - 
> either that or trying to work out what the inserted ID was by doing
> SELECT MAX(id) just after the insert. Racetastic.

Which reminds me, I wonder how ActiveRecord does that.

-- 
Piers Cawley <pdcawley at bofh.org.uk>
http://www.bofh.org.uk/


More information about the london.pm mailing list