This is related to SQL ... Look up the syntax for SELECT, especially for
things like DISTINCT (fieldname) and COUNT (fieldname). You should'nt need
to 'add a flag' anywhere.
When you do the 'add person to database', just see with a simple SELECT if
there already that name in the database!
Siggy
----- Original Message -----
From: "Pascal Romain" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, February 03, 2001 3:51 AM
Subject: [PHP-DB] duplicate entries in mysql column
> Hi all,
> i am new in the list and I would like to ask you a question.
> I am using Mysql-3.23.30 and php 4.0 to develop a recruitment
> application.
> I have a table where I store candidate details and one of the fields is
> the candidate_name. The Id of each candidate is unique but it appends
> that some candidates have the sane name because they have been inserted
> by different users.
> My problem is that I need to find a way to check all the candidate_name
> before printing them on the screen and add a flag to the ones which
> occure more than once.
> I have looked to the array functions in php (which can remove doublons
> like array_unique), to the different ways to use mysql_fetch_array and
> to the regular expressions facilities such as ereg and ereg_replace but
> I haven't find a way to do what I need to do.
> Thanks in advance for any help
> I go back to the code :-))
> Pascal
> [EMAIL PROTECTED]
>
> --
> PHP Database 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]
>
>
--
PHP Database 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]