Roland,
> Hmm, there were some complaints recently on the hackers list about
> things being posted on only one list. And a significant chunk of the
> mail I am getting from lists shows it was posted to more than one
> list.
Yeah, and you'll notice me saying "please don't cross-post" a lot.
Basically I'm trying to encourage people to NOT cross-post because we
end up with a lot of questions being answered 2 and 3 times on different
lists. It's really not fair to the people who are trying to be helpful
and answer questions. Hackers is one of the lists I am not subscribed
to (I currently read SQL, NOVICE, PHP and ANNOUNCE).
> So how would I convert an insert to an update when I detect a tuple
> is
> already present in the database? Do I have to write the whole thing
> in Perl/Tcl/whatever and do the conversion there?
Yes. Use the EXECUTE method. Or do it in your middleware. Or
establish a unique index, do both an insert and an update, and ignore
the error messages.
Or ... if you wanna get really tricky ... write some triggers to do the
substitution.
Personally, I find that keeping track, on the client side, of whether
you're adding a new record or editing an old one and acting
appropriately is better than trying to second-guess it on the database
level, but maybe that's just me.
-Josh
______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete
informationtechnology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small
businesses fax 621-2533 and non-profit organizations. San Francisco