• Resolved metaphorcreations

    (@metaphorcreations)


    I’m seeing the following error on the frontend when WP_DEBUG is enabled:

    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 '' at line 1]
    SELECT id_int, id_str FROM <code>f3tbg_mcgfuidgen_data</code> WHERE post_id =
Viewing 1 replies (of 1 total)
  • Plugin Author modcodingcom

    (@modcodingcom)

    Hello,

    We cannot reproduce it, but you can use the following solution, just change this code in main file of plugin:

    function mcgfuidgen_load_value($post_id){
    global $wpdb;
    // load value from db
    if ( defined( “MCGFUIDGEN_DEBUG” ) ) mcgfuidgen_log(“>mcgfuidgen_load_value post_id = $post_id”);
    $sql = $wpdb->prepare(“SELECT id_int, id_str FROM ".MCGFUIDGEN_TABLE_NAME." WHERE post_id = %d”, array($post_id));
    $qr = $wpdb->get_results($sql);

Viewing 1 replies (of 1 total)
  • The topic ‘Database Error’ is closed to new replies.