asterisk2billing.org
http://forum.asterisk2billing.org/

Unique Email
http://forum.asterisk2billing.org/viewtopic.php?f=15&t=3344
Page 1 of 1

Author:  stavros [ Thu Mar 06, 2008 10:08 am ]
Post subject: 

Change the SQL schema to make the field 'email' UNIQUE?

Author:  MatBoy [ Thu Mar 06, 2008 10:23 am ]
Post subject: 

stavros wrote:
Change the SQL schema to make the field 'email' UNIQUE?


Change the code that it checks for the email first using a query ?

Actually yours is easier ;)

Author:  stavros [ Thu Mar 06, 2008 2:44 pm ]
Post subject: 

On Postgres:
Code:
ALTER TABLE cc_card ADD CONSTRAINT uniqueemail UNIQUE (email);
The MySQL syntax looks similar.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/