Run a select first to check whether you have that value stored and by using
an "if" statement add the new value or show an error.
----- Original Message ----- 
From: "BAO RuiXian" <[EMAIL PROTECTED]>
To: "Radwan Aladdin" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, January 26, 2004 11:35 AM
Subject: Re: [PHP] How to prevent duplicated values?


>
>
> Radwan Aladdin wrote:
>
> >Hello..
> >
> >I want to prevent mySQL from storing the same value in a specified field
(Username).. so how can I do it?
> >
> >Regards..
> >
> >
> Make it field UNIQUE.
>
> Best
>
> Bao
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to