Support

Account

Home Forums Add-ons Gallery Field “Reverse Lookup” via Attachment Custom Field Reply To: “Reverse Lookup” via Attachment Custom Field

  • Hmm… there must be something else going on here. There is an attachment post with the correct key and value.

    When I run this:

    SELECT * FROM wp_postmeta WHERE meta_key = image_meta_image_id AND meta_value = 16233

    I get this:

    <table name=”wp_postmeta”>
    <column name=”meta_id”>15708754</column>
    <column name=”post_id”>303198</column>
    <column name=”meta_key”>image_meta_image_id</column>
    <column name=”meta_value”>16233</column>
    </table>

    Then running this to get the post info:

    SELECT * FROM wp_posts WHERE ID = 303198

    Gets me this:

    <table name=”wp_posts”>
    <column name=”ID”>303198</column>
    <column name=”post_author”>1</column>
    <column name=”post_date”>2023-08-16 01:25:29</column>
    <column name=”post_date_gmt”>2023-08-16 06:25:29</column>
    <column name=”post_content”/>
    <column name=”post_title”>PCD3960_IMG0039.jpg</column>
    <column name=”post_excerpt”/>
    <column name=”post_status”>publish</column>
    <column name=”comment_status”>open</column>
    <column name=”ping_status”>closed</column>
    <column name=”post_password”/>
    <column name=”post_name”>pcd3960_img0039-jpg</column>
    <column name=”to_ping”/>
    <column name=”pinged”/>
    <column name=”post_modified”>2023-08-30 20:14:21</column>
    <column name=”post_modified_gmt”>2023-08-31 01:14:21</column>
    <column name=”post_content_filtered”/>
    <column name=”post_parent”>0</column>
    <column name=”guid”>
    PATH TO IMAGE HERE – REMOVED FOR FORUM POST
    </column>
    <column name=”menu_order”>0</column>
    <column name=”post_type”>attachment</column>
    <column name=”post_mime_type”>image/jpeg</column>
    <column name=”comment_count”>0</column>
    </table>

    Any ideas? Thanks so so much for the help. It’s greatly appreciated!