RE: Insert if Update failed without Select

2005-01-17 Thread Logan, David (SST - Adelaide)
AIL PROTECTED] Cc: Mattias J; mysql@lists.mysql.com Subject: Re: Insert if Update failed without Select [EMAIL PROTECTED] wrote: >>Please also note hat UPDATE returns the number of records updated. If your >>UPDATE returns 0, you know that the record does not exist,

Re: Insert if Update failed without Select

2005-01-16 Thread sam wun
[EMAIL PROTECTED] wrote: Please also note hat UPDATE returns the number of records updated. If your UPDATE returns 0, you know that the record does not exist, and you might want to INSERT instead. There is one situation where the number of records updated will return 0, yet the row exists.

Re: Insert if Update failed without Select

2005-01-16 Thread beacker
>Please also note hat UPDATE returns the number of records updated. If your >UPDATE returns 0, you know that the record does not exist, and you might >want to INSERT instead. There is one situation where the number of records updated will return 0, yet the row exists. If you update the record w

Re: Insert if Update failed without Select

2005-01-15 Thread Mattias J
Please also note hat UPDATE returns the number of records updated. If your UPDATE returns 0, you know that the record does not exist, and you might want to INSERT instead. At 2005-01-15 14:54, you wrote: At 2005-01-15 14:48, you wrote: Without using Select statement, how can I execute Insert SQL

Re: Insert if Update failed without Select

2005-01-15 Thread Mattias J
At 2005-01-15 14:48, you wrote: Without using Select statement, how can I execute Insert SQL statement if Update action is failed? I may be asking for too much. If Select statemnet have to be used to determine the existence of a recordset, what is an efficient way to execute Insert if Update is

Insert if Update failed without Select

2005-01-15 Thread sam wun
Hi, Without using Select statement, how can I execute Insert SQL statement if Update action is failed? I may be asking for too much. If Select statemnet have to be used to determine the existence of a recordset, what is an efficient way to execute Insert if Update is failed? I m using MySQL 5.0