mysql query question

Guenter Hopf qe1 at qe1.org
Mon Jul 14 14:45:48 PDT 2003


hi,

use update, check affected rows, if zero use insert.
or: use insert, check for error and if gone wrong, use update.

i prefer the first one.

cheers, 
guenter

On Sun, 2003-07-13 at 03:30, Alexander Newald wrote:
> Hello,
> 
> I know that it is not really blfs related but I had no sucsess elsewhere:
> 
> How do I manage to get "if exists UPDATE else INSERT" in mysql working?
> replace is not the solution.
> 
> Thanks,
> 
> Alexander Newald
-- 
Kiss that frog, and you will get your prince... 8)

ICQ # 33638817           ---   jabber: qe1 at home.qe1.org
e-mail: qe1 at qe1.org      ---         http://www.qe1.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.linuxfromscratch.org/pipermail/blfs-support/attachments/20030714/466b85ac/attachment.sig>


More information about the blfs-support mailing list