Re: PHP4, mysql and horde: Why IMP from woody won't work with PHP4
On Tue, Jul 18, 2000 at 05:57:40PM +0200, Alexander List wrote:
> That's to check if there's already a session open. If yes, it does an
> update, if no, it does an insert.
that's weird. i'm no mysql expert, but i do know that it has a REPLACE
keyword which does exactly this. IMO, it's the one useful thing that
mysql has which is missing from postgresql.
use it instead of UPDATE...if the record exists, it gets updated. if
not, it gets created (aka inserted).