Support

Account

Home Forums Backend Issues (wp-admin) Custom phpMyAdmin database with ACF Reply To: Custom phpMyAdmin database with ACF

  • Hi @xperiap

    That’s weird. I’ve just tested it on my end and wpdb class was working with the get_field() result. Maybe there’s something on your site that modifies the query. Could you please try to reproduce the issue on one of the WordPress’ stock themes (like Twenty Sixteen) with other plugins deactivated? If it disappears, then you can activate the theme and plugins one by one to see which one causes the issue.

    It’s also possible that there’s something wrong with your custom table. Could you please try to get the entries from the wp_postmeta table like this:

    global $wpdb;
    $varA = get_field('city');
    
    $varB = $wpdb->get_results($wpdb->prepare( 
        "
        SELECT *
        FROM wp_postmeta
        WHERE meta_value = %s
        ",
        $varA
    ));
    
    print_r( $varB );

    Thanks 🙂