ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

A Database Error Occurred Error Number: 1117 Too many columns

October 31, 2013 12:07pm

Subscribe [2]
  • #1 / Oct 31, 2013 12:07pm

    Greg R

    7 posts

    Im building a site in which the client wants every image and text built into EE’s content management system. Ok… Almost done. Currently have 1030 Channel Fields, across 20 Channel Field Groups, with in 20 Channels.

    In trying to add Channel Field # 1031 I get the following error:

    A Database Error Occurred
    Error Number: 1117

    Too many columns

    ALTER TABLE `exp_channel_data` ADD `field_id_1036` text NULL

    Filename: libraries/api/Api_channel_fields.php

    Line Number: 675

    I have spent the last 2 weeks creating these Channel Fields and I really don’t want to go back and restructure everything. So I’m wondering….

    Is there a way to increase the number of columns to allow for the rest of the Channel Fields needed to complete this site?

    Any suggestions would be greatly appreciated. Thank You

  • #2 / Nov 01, 2013 12:18pm

    Ralph

    78 posts

    This is a limit of MySQL rather than expressionengine. Each field in EE will have two columns and each row (entry in EE) will have a maximum of 65,535 bytes. You’ll need to tinker around in the database to get more columns but I think you’ve probably about reached the limit. More info here: http://dev.mysql.com/doc/refman/5.0/en/column-count-limit.html

    Open phpmyadmin or whatever you’re using and have a look at exp_channel_data. You’ll see all your fields as field_id_1, field_id_2 etc. You could maybe make some the columns NOT NULL or reduce the maximum text length to free up some space.

  • #3 / Nov 02, 2013 9:24pm

    Greg R

    7 posts

    Thanks for the info.

    I think I’m going to do a little restructuring of my channels and use Matrix. I was told Matrix sets up its own tables (each having 65,535 bytes) with each Channel Field, so it will be pretty hard to use up all that space using Matrix. I’ve heard a lot of good things about Matrix. And it comes from the crew at Pixel N Tonic, so I know it’s reputable.

  • #4 / Nov 05, 2013 4:48am

    Ralph

    78 posts

    Good plan. Matrix is a very useful add-on. You can also have a channel share the same field group but just show and hide relevant fields for each channel using publish layouts, which saves you from having to create so many fields.

    http://ellislab.com/expressionengine/user-guide/cp/content/publish_page_layouts.html

  • #5 / Nov 05, 2013 6:47am

    Greg R

    7 posts

    Thanks. I didn’t know that. I also see where I can resize and rearrange fields. A very useful tip for organizing fields to make it less confusing for the person in charge of CMS once I turn the site over. Very Cool!!!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases