Support

Account

Home Forums General Issues Rows of "Select" field in the database

Solving

Rows of "Select" field in the database

  • Hi Guys,
    I have a select custom field, where it the name is “Forma” and now it has two value “Forma 1” and “Forma 2”. if i seek the posts with this field in the wp_postmeta i find 2 rows associated at each post her custom field.

    But i don’t find the table with all possible value at the field “Forma”.

    I have tried to find in the option table, but nothing. Where i wrong?

    thanks and sorry for my english

  • All acf fields are stored in a single db entry. A select field is stored as a serialized array. In the database the value of the select field will look something like this a:2:{i:0;s:7:"Forma 1";i:1;s:7:"Forma 2";}

  • Thanks for your reply. But i don’t have understood in which table i can find this values

  • That depends on what version of ACF your using and where you are adding the value.

    If you’re adding the value to a post then it will be in the _postmeta table. If you’re adding to a options page then it will be in the options table. If you’re adding it to a term, in ACF < 5.5.0 it will be in the options table, in ACF >= 5.5.0 it will be in the _termmeta table.

  • I have ACF 5.4.8, but in the options table not find the fields. In the image there is an example of the fields.

    _termmeta is empty

    Example

  • You need to explain more

    Where is the content of the field? A term? A post? An Options Page?

  • this is the problem, i do not know what are this 🙂

    but i exclude That is a term 🙂

    Unfortunately I not have created i the site.

    I must add other values with query

  • In the version you are using, terms are saved in the options table. The “option_name” will be

    
    "{$taxonomy}_{$term_id}_{$field_name}"
    

    If you update ACF Pro then the value will be saved in the term meta table and the “meta_key” will be the name of your field.

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Rows of "Select" field in the database’ is closed to new replies.