On Saturday 27 April 2002 01:34, Natividad Castro wrote:
> Hi to all,
> I have a form where users can insert or update a record. Now the way I have
> it, can just only do one thing either update or insert a new record. What I
> would like to do is: if it is a new record, execute the insert stateme
You could try inserting it, and see if it succeeds. If its fails, then you
know you have to update it.
IE
$sql= 'insert...'
$result = mysql_query($sql);
if(!$result)
{
$sql = 'update...';
mysql_query($sql);
}
-Chris
At 01:34 PM 4/26/2002 -0400, you wrote:
>Hi to all,
>I have a form where use