Support

Account

Home Forums General Issues Can you select a query from custom db table?

Solved

Can you select a query from custom db table?

  • Hello,
    I have been using this plugin for quite some time, and I love it.
    There are some customized features, that I have been using other frameworks for, and I am wondering if its possible to achieve with ACF.

    When I create a select field, is it possible to set the options of the select with database query of results from a custom table that I created? I know I can do custom relations to posts and tax, but what about custom created tables?
    Something like:

    SELECT
    title, value
    FROM
    wp_custom_table
  • Not sure what you’re asking.

    If you want ACF to save values to a custom DB, it will not do this on its own.

    If you want to populate the choices of a select field, you can populate them from anywhere as the code to do the populating is completely up to you https://www.advancedcustomfields.com/resources/dynamically-populate-a-select-fields-choices/

  • Thank you!!
    Yes, I wanted to populate choices.
    It worked with me, the plugin is now highly reliable for me.

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

The topic ‘Can you select a query from custom db table?’ is closed to new replies.