• Resolved jeff41

    (@jeff41)


    The query below works in query mode,
    SELECT * FROM wp5k_postmeta where meta_key = ‘wdm_incremental_val’
    but fails in publisher mode with the message,
    Datatables warning: table
    id=wp5k_postmeta9 –
    Unknown column
    “wdm_incremental_val” in
    ‘where clause’

    I have the premium version running WordPress 5.8.3, php version 7.4.27

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi Jeff,

    It looks like you have written the meta key value between back ticks. What happen if you change the back ticks to single quotes?

    Thanks,
    Peter

    Thread Starter jeff41

    (@jeff41)

    Hello Peter,

    Yes it does look like I used double quotes or back ticks on the meta key value. However I did use single quotes the same as I did for the query that did work. Here is the where clause I used in the publication:

    meta_key = ‘wdm_incremental_val’

    Thank you for the quick reply,
    Jeff

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi Jeff,

    Your error message indicates that wdm_incremental_val is handled as a column. Querying my postmeta table with the where clause below works for me. Please copy/paste the where clause below into your where clause without any changes:
    meta_key = 'wdm_incremental_val'

    If this does not work:
    – Can you turn on debug mode (see https://wpdataaccess.com/docs/documentation/plugin-settings/plugin/)
    – Share a public URL

    Thanks,
    Peter

    Thread Starter jeff41

    (@jeff41)

    Hello Peter,
    I turned on the debug mode, but only see a different message. Viz

    DataTables warning: table id=wp5k_postmeta9 – You have an error in your SQL syntax; check the manual
    that corresponds to your MariaDB server version for the right syntax to use near
    ‘'wdm_incremental_val&#039’ at line 1

    Although it does not show in the string, there is an ending semicolon at the end of the submitted line.

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi Jeff,

    Can you share a public URL so that I can see what’s going wrong?

    Thanks,
    Peter

    Thread Starter jeff41

    (@jeff41)

    Hello Peter,

    Am not sure if this will help. I made a staging site, repointed the publication to the new database and correct table name and confirmed I am still getting the error. Here is a link to the page:

    https://staging.malahatlegion.ca/wp-admin/admin.php?page=wpda_publisher&table_name=wp5k_wpda_publisher

    I can give you admin access to the staging site if there is some way I can give you a user name in private email.

    Please advise.

    Cheers,
    Jeff

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi Jeff,

    If you have debug mode enabled, I just need the public URL to the page showing the publication. Please use the contact form on the plugin website to exchange information in private.

    Thanks,
    Peter

    Thread Starter jeff41

    (@jeff41)

    Hi Peter,

    I’ve just been using the test mode to see the publication worked. I’ve since put the shortcode on a page but see no difference with debug enabled. Debug is turned on in the data access plugin. On checking the wp-config.php file, debug is turned on, but WP_DEBUG_DISPLAY is turned off.

    Here is a link to the page. I can’t see where to enter a url that can only be viewed by logged in viewers so have put it in below.

    https://staging.malahatlegion.ca/auction-meta/

    Hope this helps,
    Jeff

    Thread Starter jeff41

    (@jeff41)

    Hi Peter,

    I hope that helps. I had a bad experience with putting a different url on a support group last year and was reluctant to put mine up for that reason. It had the word police was in it and the hacker deterrent plugin blocked a huge number of subsequent hacking attempts. I’ve already logged many from someone in los Vegas at 209.141.42.136 on the one I put up here.

    This is a great support group but there are some who abuse it.

    Cheers,
    Jeff

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi Jeff,

    Thanks for the URL and enabling debug mode. Your where clause is incorrect.

    This is your current where clause:
    'wdm_incremental_val'

    This is what it should be:
    meta_key = 'wdm_incremental_val'

    Can you please change it and let me know if this solves your issue?

    I understand your reluctance to put your URL on the forum. There are many other plugin users feeling the same way. Please use the contact form if you prefer to share information in private next time:
    https://wpdataaccess.com/contactform/

    Don’t forget to turn of debug mode if this solves your issue!

    Thanks,
    Peter

    Thread Starter jeff41

    (@jeff41)

    Hello Peter,
    I am embarrassed. I did copy the string exactly as you had it but for some reason the “post_meta =“ was omitted as you surmised in the latest version. I apologize for not checking that before posting.
    I have put the string back to meta_key = 'wdm_incremental_val' as requested and am getting the same error message as I do without the missing “post_meta =“. Please try the post again.

    The interesting thing is the where clause, post_id = 8713 works just fine. The parser just appears to have difficulty with post_meta.

    If you need full access to the website, let me know and I will use the contact form you provided.

    Jeff

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi Jeff,

    Can you try to write meta_key between back ticks?

    Thanks,
    Peter

    Thread Starter jeff41

    (@jeff41)

    Hello Peter,

    Thank you. With back ticks around the post_meta the publisher query works just fine now.

    Thank you for your patience.

    Jeff

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    You’re welcome! ??

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Unknown column error in publisher’ is closed to new replies.