Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi,

    You can also try this in File wordpress-seo\admin\links\class-link-column-count.php in function name get_results().

    $no_strings = count($post_ids);
    $ids_placeholders = array_fill(0, $no_strings, “%d”);
    $format = implode(‘, ‘, $ids_placeholders);
    $results = $wpdb->get_results(
    $wpdb->prepare
    (
    ‘SELECT internal_link_count, incoming_link_count, object_id
    FROM ‘ . $storage->get_table_name() . ‘
    WHERE object_id IN (‘.$format.’)’,
    $post_ids
    ),ARRAY_A
    );
    This too solved your problem.
    Thanks

    Hi,

    You can also try this in File wordpress-seo\admin\links\class-link-column-count.php in function name get_results().

    $no_strings = count($post_ids);
    $ids_placeholders = array_fill(0, $no_strings, “%d”);
    $format = implode(‘, ‘, $ids_placeholders);
    $results = $wpdb->get_results(
    $wpdb->prepare
    (
    ‘SELECT internal_link_count, incoming_link_count, object_id
    FROM ‘ . $storage->get_table_name() . ‘
    WHERE object_id IN (‘.$format.’)’,
    $post_ids
    ),ARRAY_A
    );
    This too solved your problem.
    Thanks

    Hi,

    You can also try this in File wordpress-seo\admin\links\class-link-column-count.php in function name get_results().

    $no_strings = count($post_ids);
    $ids_placeholders = array_fill(0, $no_strings, “%d”);
    $format = implode(‘, ‘, $ids_placeholders);
    $results = $wpdb->get_results(
    $wpdb->prepare
    (
    ‘SELECT internal_link_count, incoming_link_count, object_id
    FROM ‘ . $storage->get_table_name() . ‘
    WHERE object_id IN (‘.$format.’)’,
    $post_ids
    ),ARRAY_A
    );
    This too solved your problem.
    Thanks

    Hi,
    Please try this in Yoast SEO Plugin’s file wordpress-seo\admin\links\class-link-column-count.php in function name get_results().

    Please change the following query.

    Before Changing query:

    $results = $wpdb->get_results(
    $wpdb->prepare( ‘
    SELECT internal_link_count, incoming_link_count, object_id
    FROM ‘ . $storage->get_table_name() . ‘
    WHERE object_id IN ( %1$s )’,
    implode( ‘,’, $post_ids )
    ),
    ARRAY_A
    );

    After Changing query:

    $imploded_post_ids = implode( ‘,’, $post_ids );
    $results = $wpdb->get_results(
    ‘SELECT internal_link_count, incoming_link_count, object_id
    FROM ‘ . $storage->get_table_name() . ‘
    WHERE object_id IN ( ‘.$imploded_post_ids.’)’,ARRAY_A
    );
    and check.
    This solved my problem.
    Thanks

    Hi,

    I also got same error and solved this by doing changes in code.

    Try This in File wordpress-seo\admin\links\class-link-column-count.php in function name get_results().

    Please change the following query.

    Before Changing query:

    $results = $wpdb->get_results(
    $wpdb->prepare( ‘
    SELECT internal_link_count, incoming_link_count, object_id
    FROM ‘ . $storage->get_table_name() . ‘
    WHERE object_id IN ( %1$s )’,
    implode( ‘,’, $post_ids )
    ),
    ARRAY_A
    );

    After Changing query:

    $imploded_post_ids = implode( ‘,’, $post_ids );
    $results = $wpdb->get_results(
    ‘SELECT internal_link_count, incoming_link_count, object_id
    FROM ‘ . $storage->get_table_name() . ‘
    WHERE object_id IN ( ‘.$imploded_post_ids.’)’,ARRAY_A
    );

    Hi,

    Try This in File wordpress-seo\admin\links\class-link-column-count.php in function name get_results().

    Please change the following query.

    Before Changing query:

    $results = $wpdb->get_results(
    $wpdb->prepare( ‘
    SELECT internal_link_count, incoming_link_count, object_id
    FROM ‘ . $storage->get_table_name() . ‘
    WHERE object_id IN ( %1$s )’,
    implode( ‘,’, $post_ids )
    ),
    ARRAY_A
    );

    After Changing query:

    $imploded_post_ids = implode( ‘,’, $post_ids );
    $results = $wpdb->get_results(
    ‘SELECT internal_link_count, incoming_link_count, object_id
    FROM ‘ . $storage->get_table_name() . ‘
    WHERE object_id IN ( ‘.$imploded_post_ids.’)’,ARRAY_A
    );
    and check.
    This will help you.

    Hi,

    Try This in File wordpress-seo\admin\links\class-link-column-count.php in function name get_results().

    Please change the following query.

    Before Changing query:

    $results = $wpdb->get_results(
    $wpdb->prepare( ‘
    SELECT internal_link_count, incoming_link_count, object_id
    FROM ‘ . $storage->get_table_name() . ‘
    WHERE object_id IN ( %1$s )’,
    implode( ‘,’, $post_ids )
    ),
    ARRAY_A
    );

    After Changing query:

    $imploded_post_ids = implode( ‘,’, $post_ids );
    $results = $wpdb->get_results(
    ‘SELECT internal_link_count, incoming_link_count, object_id
    FROM ‘ . $storage->get_table_name() . ‘
    WHERE object_id IN ( ‘.$imploded_post_ids.’)’,ARRAY_A
    );
    and check.
    This solved my problem.
    Thanks

    Hi,

    Try This in Yoast SEO Plugin’s File wordpress-seo\admin\links\class-link-column-count.php in function name get_results().

    Please change the following query.

    Before Changing query:

    $results = $wpdb->get_results(
    $wpdb->prepare( ‘
    SELECT internal_link_count, incoming_link_count, object_id
    FROM ‘ . $storage->get_table_name() . ‘
    WHERE object_id IN ( %1$s )’,
    implode( ‘,’, $post_ids )
    ),
    ARRAY_A
    );

    After Changing query:

    $imploded_post_ids = implode( ‘,’, $post_ids );
    $results = $wpdb->get_results(
    ‘SELECT internal_link_count, incoming_link_count, object_id
    FROM ‘ . $storage->get_table_name() . ‘
    WHERE object_id IN ( ‘.$imploded_post_ids.’)’,ARRAY_A
    );
    and check.
    This solved my problem.
    Thanks

    • This reply was modified 7 years, 2 months ago by wordpressbeta.

    Hi,

    Try This in File wordpress-seo\admin\links\class-link-column-count.php in function name get_results().

    Please change the following query.

    Before Changing query:

    $results = $wpdb->get_results(
    $wpdb->prepare( ‘
    SELECT internal_link_count, incoming_link_count, object_id
    FROM ‘ . $storage->get_table_name() . ‘
    WHERE object_id IN ( %1$s )’,
    implode( ‘,’, $post_ids )
    ),
    ARRAY_A
    );

    After Changing query:

    $imploded_post_ids = implode( ‘,’, $post_ids );
    $results = $wpdb->get_results(
    ‘SELECT internal_link_count, incoming_link_count, object_id
    FROM ‘ . $storage->get_table_name() . ‘
    WHERE object_id IN ( ‘.$imploded_post_ids.’)’,ARRAY_A
    );
    and check.

Viewing 9 replies - 1 through 9 (of 9 total)