On 13 Jan 2002, at 12:51, Dean Ouellette wrote:

> I am entering info from form into database, is there a way to check
> say firstname, lastname and address to see if it is a duplicate to
> what is already in database and if it is then just enter any new
> information they may enter and not create a new entry 

If using mysql you can use REPLACE rather than insert (if you 
also pass a unique key/value with your statement).

Of course you have some means of identifying a record. Perhaps it 
is a combo of firstname, lastname and address but that's not very 
good. 

I recall having this situation appear for me in the past ... I think it 
may be an error in design when one cannot be sure if it's an 
INSERT for a new record or an UPDATE to an existing record. 
Perhaps you could dissuage me otherwise with your example.

Peter



---------------------------
"Reality is that which, when you stop believing in it, doesn't go
away".
                -- Philip K. Dick

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to