Click here to register.
      
Sprechen Sie WebGUI? Parlez vous WebGUI? Se habla WebGUI? Spreekt u WebGUI?

Do you speak WebGUI? Please help us translate WebGUI into your language.



     Discuss > Web Design, Templates, and Themes

SQLForm with unique field(s)

User zylo
Date 2/8/2008 12:11 pm
Views 436
Rating -1    Rate [
|
]
Previous · Next
User Message
zylo

I am creating an sqlform for a newsletter I am sending out,
where users can signup with:

Name and Email

I want the sqlform to check the email field in the  database table , to see
that is does not already exist.

I tried to manually make the database field Unique (from a mysql perspective), like this:
 alter table mailinglist change email email char(255) unique;

It works fine from a mysql view, but when i enter none-unique values,
I get a server error.
THe best would perhaps be for the SQLForm to check on the field attributes in the database table and if its unique, check it against the submitted data before inserting.

 
Is there any way to do what I am trying to do?
Or should I tweak SQLform to check field attributes before inserts?

 

--- (Edited on 2/8/2008 12:11 pm [GMT-0600] by zylo) ---

--- (Edited on 2/8/2008 12:34 pm [GMT-0600] by zylo) ---



Back to Top
Rate [
|
]
 
 

Config File Changes by JT - Thu @ 03:32pm

Poll suggestion by koen - Thu @ 03:18pm

Re: WRE upgrade 0.8.3 to 0.8.4 issue by koen - Thu @ 02:18pm

Re: "No Upgrade Necessary" by pvanthony - Thu @ 12:41pm

Re: WRE upgrade 0.8.3 to 0.8.4 issue by jmack - Thu @ 12:37pm

Installed WebGUI on SuSE 10.1 64bit by crythias - Thu @ 09:20am

Re: Question to Spectre by JT - Thu @ 06:40am

Question to Spectre by bepo - Thu @ 06:29am

Re: Re-design of "Get Add Ons" section by Chirifischio - Thu @ 05:45am

Re: "No Upgrade Necessary" by erikms - Thu @ 01:48am

Smoketest For nightly_2008-08-28 by Visitor - Thu @ 01:45am

Re: Can a WebGUI navigation generate li's of different sizes? by knowmad - Wed @ 10:11pm

Re: WRE upgrade 0.8.3 to 0.8.4 issue by pvanthony - Wed @ 09:07pm