Re: duplicate entries in mysql column

From: Date: Fri, 02 Feb 2001 21:57:33 +0000
Subject: Re: duplicate entries in mysql column
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-6331@lists.php.net to get a copy of this message
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" <Pascal@cybcorp.com> To: <php-db@lists.php.net> 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 > Pascal@cybcorp.com > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.db (#6331) next »