Databasen - Revisited

Jonathan Rockway jon at jrock.us
Thu Oct 19 19:01:32 BST 2006


> 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.

We have the same problem with Microsoft SQL server.  Our ODBC bridge
requires us to SELECT MAX(id) when we want to know the insert ID.

Crappy on paper, but it hasn't caused us any (detectable ;) problems in
production.  MySQL (or Pg) would actually solve the problem for us,
despite being a "tainted brand" (I love that).

-- 
package JAPH;use Catalyst qw/-Debug/;($;=JAPH)->config(name => do {
$,.=reverse qw[Jonathan tsu rehton lre rekca Rockway][$_].[split //,
";$;"]->[$_].q; ;for 1..4;$,=~s;^.;;;$,});$;->setup;


More information about the london.pm mailing list