Forums

No duplicate in db

globalace 18 Apr, 2012
I created a form with the wizard. I have attached the form to create a table in my db.
I would not be duplicated on the email field.
I have tried to create the table and indicate how primary key but I get emails:

Check query table below:

CREATE TABLE IF NOT EXISTS `# __chronoforms_SUBSCRIBE` (`cf_id` INT (11) auto_increment, `cf_uid` VARCHAR (255), `cf_created` DATETIME, `cf_modified` DATETIME, `cf_ipaddress` VARCHAR (255), `cf_user_id` VARCHAR (255), `Name` VARCHAR (255), `name` VARCHAR (255), Un `VARCHAR (255),` dinner `VARCHAR (255),` Email `varchar (255),` Post `VARCHAR (255) , `privacy` VARCHAR (255), `chrono_verification` VARCHAR (255), `Confirm` VARCHAR (255), PRIMARY KEY (`email`));

thanks
GreyHead 18 Apr, 2012
Hi globalace,

It looks as if some of your input names have spaces in them :-(

` dinner `VARCHAR (255),
` Email `varchar (255),
` Post `VARCHAR (255) ,

Also you have Email and email in different places.

Bob
globalace 18 Apr, 2012
The code is created by chronoforms wizard....
GreyHead 18 Apr, 2012
Hi globalace,

And it still looks as though there are spaces in some of the input names :-(

Bob
globalace 18 Apr, 2012
hello,
I solved, now the database is created, I deleted the id.
But unfortunately by completing the form does not insert the row into the table ....
help!
GreyHead 18 Apr, 2012
Hi globalace,

Does your table still have a primary key if you deleted the id?

Please drag a Debugger action into the On Submit event, then submit the form and post the debug - including the 'dummy emails' results here. Note: if you are using the Easy Wizard you may need to switch to the Advanced Wizard to do this; if you want to continue to use the Easy Wizard please make a copy of your form first and add the Debugger action to the copy.

Bob
globalace 19 Apr, 2012
I have debugging enabled.
I receive:

Array
(
    [option] => com_chronoforms
    [chronoform] => iscrizione
    [event] => submit
    [Itemid] => 
    [Cognome] => a
    [Nome] => myname
    [Universita] => a
    [Cena] => No
    [Email] => my@emai.it
    [Messaggio] => a
    [privacy] => Accetto
    [chrono_verification] => mEZcL
    [Conferma] => Conferma iscrizione
    [4decaa5520d741d57a6343267777b001] => 1
    [chronoform_data] => Array
        (
            [cf_uid] => eb74015ed9fba0bb7a2bbdd8df56d621
            [cf_created] => 2012-04-19 19:21:08
            [cf_ipaddress] => 127.0.0.1
            [cf_user_id] => 0
            [Email] => 
        )

    [chronoform_data_email] => 
)

Validation Errors:

Array
(
)

Debug Data

    Tablechronoforms_data_iscrizione: :store fallito - Duplicate entry '' for key 1 SQL=INSERT INTO `waaiseloj_chronoforms_data_iscrizione` (`cf_uid`,`cf_created`,`cf_ipaddress`,`cf_user_id`) VALUES ('eb74015ed9fba0bb7a2bbdd8df56d621','2012-04-19 19:21:08','127.0.0.1','0')




Email in chronoform_data is null why?
GreyHead 21 Apr, 2012
Hi globalace,

I'm not sure but I think you may have removed the primary key from the table.

Please see this post for more info on this error.

Bob
This topic is locked and no more replies can be posted.