• Resolved mrwweb

    (@mrwweb)


    Running the latest Yoast and WordPress (4.8.2), I’m seeing the following appear at the top of every “All posts” page in the admin (i.e. the list table of all post in a post type).

    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘%1$s )’ at line 3]
    SELECT internal_link_count, incoming_link_count, object_id FROM cc_yoast_seo_meta WHERE object_id IN ( %1$s )

    Site is on SiteGround on PHP7.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Same here. Just noticed that after latest WordPress update tonight.

    Can confirm too – same error.

    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
    );

    Plugin Support marcanor

    (@marcanor)

    Hello,
    This issue has been fixed in the latest release of the Yoast plugin. Please update to Yoast SEO 5.4.1.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Database Error Notice on “All posts” admin pages’ is closed to new replies.