Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: Checking for Dupes in MySQL

by jeroenes (Priest)
on Nov 29, 2001 at 14:54 UTC ( #128322=note: print w/replies, xml ) Need Help??

in reply to Checking for Dupes in MySQL

Standard SQL (dunno whether mysql supports it): add a UNIQUE modifier in the CREATE TABLE statement at the e-mail column. Afterwards, your dbase won't allow duplicate e-mail addresses.

Be sure to add decent error-checking to inform your prospective users why their entry was not allowed.

"We are not alone"(FZ)

Replies are listed 'Best First'.
Re: Re: Checking for Dupes in MySQL
by belg4mit (Prior) on Nov 30, 2001 at 02:24 UTC
    MySQL is SQL92 compliant.

    perl -p -e "s/(?:\w);([st])/'\$1/mg"

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://128322]
[trippledubs]: stevie are you still ignoring me
[trippledubs]: either way; sorry.
[trippledubs]: Someone please tell Steveie that I humbly and sincerely apologize
[trippledubs]: i'll try again later. wink

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2017-03-27 03:25 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (315 votes). Check out past polls.