PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

"List Fields" and the Database (2 part question)

  1. Brad-sd
    Member

    I have two database questions. First I just want to say that I'm not an expert with databases. I know just enough to figure things out and get what I need done (usually in the least efficient way). I'm not familiar enough to go into the guts of WordPress to view the actual database setup.

    Question #1

    I am trying to figure out how "List Field" entries are handled in the database. Each element (column : row) does not seem to have a dedicated field.

    I need to export form entries and add them to an offline database for further analysis and manipulation. I am having trouble with list fields. For instance, I have one that is three columns and up to ten rows (a1:c10). From what I can tell, when exported, the completed field will show something like this: ROW 1 (1|2|3). If one of the columns if left blank, I would have expected: ROW 1 (1||3). Instead, unused columns and unused rows are ignored in the export: ROW 1 (1|3).

    I understand why it is done this way, but I'm wondering how this is handled in the WordPress database.

    I'm sure I can create a small program to take the export file, process the data in a way that it can be successfully imported to my offline database. I was just hoping to eliminate that extra step.

    -------------

    Question #2

    I have several small forms, and one large (88 fields) form. Since the forms share the same database as our WordPress install, does our database become more vulnerable to errors with many and/or large forms?

    Posted 12 years ago on Thursday February 9, 2012 | Permalink
  2. Hi Brad,

    Here is a brief run down on how list field data is stored:

    http://www.gravityhelp.com/forums/topic/list-field-help

    You will see from this example (index 6) how the data is stored in a serialized array as the value for a single field in the database. The thread above also provides details on how to unserialize this data and what format it will be in after it is unserialized.

    For your second question, short answer is no. You'll be fine. :)

    Posted 12 years ago on Tuesday February 14, 2012 | Permalink