Chronoforms fields limitation??? or is just MySQL

frediutah 22 Oct, 2010
I have a huge form for an accountant website.

I have created a form with more than 800 fields...

I did not change varchar in all the fields, perhaps as far as i research limit is 1024 fields so I should be ok...

1.- How can i check this MySQL settings?
2.- I would like to keep varchar(255) in all the fields so I dont need to spend 2 days altering the table if it is possible.
3.- When I create the table if i select all the fields (green) then I get this error:

Error while creating table :You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOT NULL) ENGINE = MYISAM' at line 1

SQL=CREATE TABLE `jos_chronoforms_GeneralTaxOrganizr2010` (`cf_id` INT(11) NOT NULL, `uid` VARCHAR(255) NOT NULL, `recordtime` VARCHAR(255) NOT NULL, `ipaddress` VARCHAR(255) NOT NULL, `cf_user_id` VARCHAR(255) NOT NULL, `claimed_anthr_prsn_rtrn` VARCHAR(255) NOT NULL, `have_dep` VARCHAR(255) NOT NULL, `agree_continue` VARCHAR(255) NOT NULL, `fname_depe01` VARCHAR(255) NOT NULL, `mname_depe01` VARCHAR(255) NOT NULL, `lname_depe01` VARCHAR(255) NOT NULL, `DOB_depe01` VARCHAR(255) NOT NULL, `ssn_depe01` VARCHAR(255) NOT NULL, `month_depe01` VARCHAR(255) NOT NULL, `student_dep01` VARCHAR(255) NOT NULL, `depe_claimed_by01` VARCHAR(255) NOT NULL, `fname_depe02` VARCHAR(255) NOT NULL, `lname_depe02` VARCHAR(255) NOT NULL, `DOB_depe02` VARCHAR(255) NOT NULL, `ssn_depe02` VARCHAR(255) NOT NULL, `month_depe02` VARCHAR(255) NOT NULL, `student_dep02` VARCHAR(255) NOT NULL, `depe_claimed_by02` VARCHAR(255) NOT NULL, `fname_depe03` VARCHAR(255) NOT NULL, `mname_depe03` VARCHAR(255) NOT NULL, `lname_depe03` VARCHAR(255) NOT NULL, `DOB_depe03` VARCHAR(255) NOT NULL, `ssn_depe03` VARCHAR(255) NOT NULL, `month_depe03` VARCHAR(255) NOT NULL, `student_dep03` VARCHAR(255) NOT NULL, `depe_claimed_by03` VARCHAR(255) NOT NULL, `fname_depe04` VARCHAR(255) NOT NULL, `mname_depe04` VARCHAR(255) NOT NULL, `lname_depe04` VARCHAR(255) NOT NULL, `DOB_depe04` VARCHAR(255) NOT NULL, `ssn_depe04` VARCHAR(255) NOT NULL, `month_depe04` VARCHAR(255) NOT NULL, `student_dep04` VARCHAR(255) NOT NULL, `depe_claimed_by04` VARCHAR(255) NOT NULL, `fname_depe05` VARCHAR(255) NOT NULL, `mname_depe05` VARCHAR(255) NOT NULL, `lname_depe05` VARCHAR(255) NOT NULL, `DOB_depe05` VARCHAR(255) NOT NULL, `ssn_depe05` VARCHAR(255) NOT NULL, `month_depe05` VARCHAR(255) NOT NULL, `student_dep05` VARCHAR(255) NOT NULL, `depe_claimed_by05` VARCHAR(255) NOT NULL, `fname_depe06` VARCHAR(255) NOT NULL, `mname_depe06` VARCHAR(255) NOT NULL, `DOB_depe06` VARCHAR(255) NOT NULL, `ssn_depe06` VARCHAR(255) NOT NULL, `month_depe06` VARCHAR(255) NOT NULL, `student_dep06` VARCHAR(255) NOT NULL, `depe_claimed_by06` VARCHAR(255) NOT NULL, `fname_depe07` VARCHAR(255) NOT NULL, `mname_depe07` VARCHAR(255) NOT NULL, `DOB_depe07` VARCHAR(255) NOT NULL, `ssn_depe07` VARCHAR(255) NOT NULL, `month_depe07` VARCHAR(255) NOT NULL, `student_dep07` VARCHAR(255) NOT NULL, `depe_claimed_by07` VARCHAR(255) NOT NULL, `fname_depe08` VARCHAR(255) NOT NULL, `mname_depe08` VARCHAR(255) NOT NULL, `lname_depe08` VARCHAR(255) NOT NULL, `DOB_depe08` VARCHAR(255) NOT NULL, `ssn_depe08` VARCHAR(255) NOT NULL, `month_depe08` VARCHAR(255) NOT NULL, `student_dep08` VARCHAR(255) NOT NULL, `depe_claimed_by08` VARCHAR(255) NOT NULL, `fname_depe09` VARCHAR(255) NOT NULL, `mname_depe09` VARCHAR(255) NOT NULL, `lname_depe09` VARCHAR(255) NOT NULL, `DOB_depe09` VARCHAR(255) NOT NULL, `ssn_depe09` VARCHAR(255) NOT NULL, `month_depe09` VARCHAR(255) NOT NULL, `student_dep09` VARCHAR(255) NOT NULL, `depe_claimed_by09` VARCHAR(255) NOT NULL, `fname_depe10` VARCHAR(255) NOT NULL, `mname_depe10` VARCHAR(255) NOT NULL, `lname_depe10` VARCHAR(255) NOT NULL, `DOB_depe10` VARCHAR(255) NOT NULL, `ssn_depe10` VARCHAR(255) NOT NULL, `month_depe10` VARCHAR(255) NOT NULL, `student_dep10` VARCHAR(255) NOT NULL, `depe_claimed_by10` VARCHAR(255) NOT NULL, `adopt_child` VARCHAR(255) NOT NULL, `date_in_state01` VARCHAR(255) NOT NULL, `date_out_state01` VARCHAR(255) NOT NULL, `county_resident_state01` VARCHAR(255) NOT NULL, `school_district_state01` VARCHAR(255) NOT NULL, `date_in_state02` VARCHAR(255) NOT NULL, `date_out_state02` VARCHAR(255) NOT NULL, `county_resident_state02` VARCHAR(255) NOT NULL, `school_district_state02` VARCHAR(255) NOT NULL, `date_in_state03` VARCHAR(255) NOT NULL, `date_out_state03` VARCHAR(255) NOT NULL, `county_resident_state03` VARCHAR(255) NOT NULL, `school_district_state03` VARCHAR(255) NOT NULL, `date_in_state04` VARCHAR(255) NOT NULL, `date_out_state04` VARCHAR(255) NOT NULL, `county_resident_state04` VARCHAR(255) NOT NULL, `school_district_state04` VARCHAR(255) NOT NULL, `income_wages` VARCHAR(255) NOT NULL, `w2employer01` VARCHAR(255) NOT NULL, `w2_amount01` VARCHAR(255) NOT NULL, `w2employer02` VARCHAR(255) NOT NULL, `w2_amount02` VARCHAR(255) NOT NULL, `w2employer03` VARCHAR(255) NOT NULL, `w2_amount03` VARCHAR(255) NOT NULL, `w2employer04` VARCHAR(255) NOT NULL, `w2_amount04` VARCHAR(255) NOT NULL, `w2employer05` VARCHAR(255) NOT NULL, `w2_amount05` VARCHAR(255) NOT NULL, `w2employer06` VARCHAR(255) NOT NULL, `w2_amount06` VARCHAR(255) NOT NULL, `interest_income` VARCHAR(255) NOT NULL, `institution01` VARCHAR(255) NOT NULL, `institution_amount01` VARCHAR(255) NOT NULL, `institution02` VARCHAR(255) NOT NULL, `institution_amount02` VARCHAR(255) NOT NULL, `institution03` VARCHAR(255) NOT NULL, `institution_amount03` VARCHAR(255) NOT NULL, `institution04` VARCHAR(255) NOT NULL, `institution_amount04` VARCHAR(255) NOT NULL, `institution05` VARCHAR(255) NOT NULL, `institution_amount05` VARCHAR(255) NOT NULL, `institution06` VARCHAR(255) NOT NULL, `institution_amount06` VARCHAR(255) NOT NULL, `dividen_income` VARCHAR(255) NOT NULL, `institution_div01` VARCHAR(255) NOT NULL, `institution_div_amount01` VARCHAR(255) NOT NULL, `institution_div02` VARCHAR(255) NOT NULL, `institution_div_amount02` VARCHAR(255) NOT NULL, `institution_div03` VARCHAR(255) NOT NULL, `institution_div_amount03` VARCHAR(255) NOT NULL, `institution_div04` VARCHAR(255) NOT NULL, `institution_div_amount04` VARCHAR(255) NOT NULL, `institution_div05` VARCHAR(255) NOT NULL, `institution_div_amount05` VARCHAR(255) NOT NULL, `institution_div06` VARCHAR(255) NOT NULL, `institution_div_amount06` VARCHAR(255) NOT NULL, `stock_transaction` VARCHAR(255) NOT NULL, `stock_transactions_cont01` VARCHAR(255) NOT NULL, `name_ticker01` VARCHAR(255) NOT NULL, `buy_date_ticker01` VARCHAR(255) NOT NULL, `buy_amount_ticker01` VARCHAR(255) NOT NULL, `sales_date_ticker01` VARCHAR(255) NOT NULL, `sales_amount_ticker01` VARCHAR(255) NOT NULL, `name_ticker02` VARCHAR(255) NOT NULL, `buy_date_ticker02` VARCHAR(255) NOT NULL, `buy_amount_ticker02` VARCHAR(255) NOT NULL, `sales_date_ticker02` VARCHAR(255) NOT NULL, `sales_amount_ticker02` VARCHAR(255) NOT NULL, `name_ticker03` VARCHAR(255) NOT NULL, `buy_date_ticker03` VARCHAR(255) NOT NULL, `buy_amount_ticker03` VARCHAR(255) NOT NULL, `sales_date_ticker03` VARCHAR(255) NOT NULL, `sales_amount_ticker03` VARCHAR(255) NOT NULL, `name_ticker04` VARCHAR(255) NOT NULL, `buy_date_ticker04` VARCHAR(255) NOT NULL, `buy_amount_ticker04` VARCHAR(255) NOT NULL, `sales_date_ticker04` VARCHAR(255) NOT NULL, `sales_amount_ticker04` VARCHAR(255) NOT NULL, `name_ticker05` VARCHAR(255) NOT NULL, `buy_date_ticker05` VARCHAR(255) NOT NULL, `buy_amount_ticker05` VARCHAR(255) NOT NULL, `sales_date_ticker05` VARCHAR(255) NOT NULL, `sales_amount_ticker05` VARCHAR(255) NOT NULL, `stock_transactions_cont02` VARCHAR(255) NOT NULL, `name_ticker06` VARCHAR(255) NOT NULL, `buy_date_ticker06` VARCHAR(255) NOT NULL, `buy_amount_ticker06` VARCHAR(255) NOT NULL, `sales_date_ticker06` VARCHAR(255) NOT NULL, `sales_amount_ticker06` VARCHAR(255) NOT NULL, `name_ticker07` VARCHAR(255) NOT NULL, `buy_date_ticker07` VARCHAR(255) NOT NULL, `buy_amount_ticker07` VARCHAR(255) NOT NULL, `sales_date_ticker07` VARCHAR(255) NOT NULL, `sales_amount_ticker07` VARCHAR(255) NOT NULL, `name_ticker08` VARCHAR(255) NOT NULL, `buy_date_ticker08` VARCHAR(255) NOT NULL, `buy_amount_ticker08` VARCHAR(255) NOT NULL, `sales_date_ticker08` VARCHAR(255) NOT NULL, `sales_amount_ticker08` VARCHAR(255) NOT NULL, `name_ticker09` VARCHAR(255) NOT NULL, `buy_date_ticker09` VARCHAR(255) NOT NULL, `buy_amount_ticker09` VARCHAR(255) NOT NULL, `sales_date_ticker09` VARCHAR(255) NOT NULL, `sales_amount_ticker09` VARCHAR(255) NOT NULL, `name_ticker10` VARCHAR(255) NOT NULL, `buy_date_ticker10` VARCHAR(255) NOT NULL, `buy_amount_ticker10` VARCHAR(255) NOT NULL, `sales_date_ticker10` VARCHAR(255) NOT NULL, `sales_amount_ticker10` VARCHAR(255) NOT NULL, `stock_transactions_cont03` VARCHAR(255) NOT NULL, `name_ticker11` VARCHAR(255) NOT NULL, `buy_date_ticker11` VARCHAR(255) NOT NULL, `buy_amount_ticker11` VARCHAR(255) NOT NULL, `sales_date_ticker11` VARCHAR(255) NOT NULL, `sales_amount_ticker11` VARCHAR(255) NOT NULL, `name_ticker12` VARCHAR(255) NOT NULL, `buy_date_ticker12` VARCHAR(255) NOT NULL, `buy_amount_ticker12` VARCHAR(255) NOT NULL, `sales_date_ticker12` VARCHAR(255) NOT NULL, `sales_amount_ticker12` VARCHAR(255) NOT NULL, `name_ticker13` VARCHAR(255) NOT NULL, `buy_date_ticker13` VARCHAR(255) NOT NULL, `buy_amount_ticker13` VARCHAR(255) NOT NULL, `sales_date_ticker13` VARCHAR(255) NOT NULL, `sales_amount_ticker13` VARCHAR(255) NOT NULL, `name_ticker14` VARCHAR(255) NOT NULL, `buy_date_ticker14` VARCHAR(255) NOT NULL, `buy_amount_ticker14` VARCHAR(255) NOT NULL, `sales_date_ticker14` VARCHAR(255) NOT NULL, `sales_amount_ticker14` VARCHAR(255) NOT NULL, `name_ticker15` VARCHAR(255) NOT NULL, `buy_date_ticker15` VARCHAR(255) NOT NULL, `buy_amount_ticker15` VARCHAR(255) NOT NULL, `sales_date_ticker15` VARCHAR(255) NOT NULL, `sales_amount_ticker15` VARCHAR(255) NOT NULL, `stock_transactions_cont04` VARCHAR(255) NOT NULL, `name_ticker16` VARCHAR(255) NOT NULL, `buy_date_ticker16` VARCHAR(255) NOT NULL, `buy_amount_ticker16` VARCHAR(255) NOT NULL, `sales_date_ticker16` VARCHAR(255) NOT NULL, `sales_amount_ticker16` VARCHAR(255) NOT NULL, `name_ticker17` VARCHAR(255) NOT NULL, `buy_date_ticker17` VARCHAR(255) NOT NULL, `buy_amount_ticker17` VARCHAR(255) NOT NULL, `sales_date_ticker17` VARCHAR(255) NOT NULL, `sales_amount_ticker17` VARCHAR(255) NOT NULL, `name_ticker18` VARCHAR(255) NOT NULL, `buy_date_ticker18` VARCHAR(255) NOT NULL, `buy_amount_ticker18` VARCHAR(255) NOT NULL, `sales_date_ticker18` VARCHAR(255) NOT NULL, `sales_amount_ticker18` VARCHAR(255) NOT NULL, `name_ticker19` VARCHAR(255) NOT NULL, `buy_date_ticker19` VARCHAR(255) NOT NULL, `buy_amount_ticker19` VARCHAR(255) NOT NULL, `sales_date_ticker19` VARCHAR(255) NOT NULL, `sales_amount_ticker19` VARCHAR(255) NOT NULL, `name_ticker20` VARCHAR(255) NOT NULL, `buy_date_ticker20` VARCHAR(255) NOT NULL, `buy_amount_ticker20` VARCHAR(255) NOT NULL, `sales_date_ticker20` VARCHAR(255) NOT NULL, `sales_amount_ticker20` VARCHAR(255) NOT NULL, `child_invest` VARCHAR(255) NOT NULL, `child_investments` NOT NULL) ENGINE = MYISAM ;



Sorry it is very long but just look at the last line and you will notice that
1.- 'child investments' is followed by NOT NULL and varchar(255) is missing.
2.- I also have probably another 200 fields after this point....

Is this a chronoforms table creation limitation?
If yes, Is there any way to fix this....
Or the limitation is within the variable that storage the query?

Thanks in advance for your help....

If I select the first 50 fields or so it works like a charm...
frediutah 22 Oct, 2010
oh I forgot to mention:

* Server: Localhost via UNIX socket
* Server version: 5.1.51
* Protocol version: 10
* User: nragu@localhost
* MySQL charset: UTF-8 Unicode (utf8)


Hosting Company: namecheap.com (we are moving to godaddys VPS soon)
Go daddys VPS is available if you want to do some testings...

Database Version: 5.1.51
Database Collation: latin1_swedish_ci
PHP Version: 5.2.14
Web Server: Apache
Web Server to PHP interface: cgi
Joomla! Version: Joomla! 1.5.17 Stable [ Wojmamni ama woobusani ] 27-April-2010 04:00 GMT
User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10 (.NET CLR 4.0.20506)

In IE I have some issues due to timeouts...
GreyHead 23 Oct, 2010
Hi frediutah ,

Tough to say. As far as I can see there isn't an underlying limit on MYSQL tables, or on PHP strings that would trim this. But there could well be some intermediate limit that is cutting in.

You could pull the fields list out of the jos_chronocontact and use a text editor to build an SQL script to run directly in PHPMyAdmin

I guess that my answer is that I'd want to go back and re-think the form structure. See if I can't break this down into separate tables, or aggregate some of the results using array data :-(

Bob
frediutah 02 Nov, 2010
Thanks for your help.
I will try to create the table from shell borrowing the fields as you state.
I will tell you later if this method works.
frediutah 19 Nov, 2010
I did break the Form into three smaller forms and seems to run smooth this way.
Seems like when table gets close to 700 fields the problems starts...
frediutah 19 Nov, 2010
Now, ChronoForms is able to create the database.
Fields are close to 300

I mix varchars from 5 to 40 in size....
there are about 5-10 fields with varchar 70

As soon as I add the DB Connection I get this error when I access the Form:

Parse error: syntax error, unexpected '$', expecting T_VARIABLE in /home/adminair/public_html/Home/components/com_chronocontact/chronocontact.php(53) : eval()'d code on line 204


I delete the <input> and <select> and I still getting the error even If I disconnect the DB, SAVE and then reconnect the DB.

Any ideas or Is somebody else experiencing this out?
GreyHead 19 Nov, 2010
Hi frediutah,

It's a error somewhere in the Table class that ChronoForms creates to write to the database. Usually the error is due to a space, dash or some other special character in an input name. The $ message may flag something else here.

The first thing to do is to refresh the DB Connection (see below). If this doesn't work I'd use PHPMyAdmin to look at the jos_chrono_contact record for the form. The class is stored in the dbclasses column. Copy it into a text editor to find line 204

Bob

You need to refresh the DB Connection after any changes to database column names. In the Form Editor click the DB Connection tab and set the Connection to 'No'. Click the 'Apply icon in the toolbar to save the form, open the DB Connection tab, set the Connection back to 'Yes' and re-save the form. This will refresh the copy of the table information that ChronoForms uses.
frediutah 30 Nov, 2010
I dont know where the error was, but I recreate the DB picking only the first 50 fields.
Then I used PHPMyAdmin to add the rest 300 fields or so.
Also I just limit varchars to the minimum.
Replaced lots of varchars to tinyblob
and everytime I had a dollar value I used decimal 10,0

It works like a charm now.

Thanks for all your help!

Also I researched PHP limits.
This is very handy for somebody in the future.

There is a limit of 1024 fields.
And also there is a limit of 65535 characters counting all fields toghether. BLOBS does not count.
This means that probably I reached the limit using 300 fields or more with varchar 256.
Since 256*256=65536
This topic is locked and no more replies can be posted.