• Resolved jeff41

    (@jeff41)


    This query generated by the query builder works fine –

    SELECT wp5k_postmeta.meta_id as ‘Meta_id’
    , wp5k_postmeta.post_id as ‘Post_id’
    , wp5k_postmeta.meta_key as ‘Meta_key’
    , wp5k_postmeta.meta_value as ‘Meta_value’
    FROM wp5k_postmeta
    WHERE (wp5k_postmeta.meta_key = ‘wdm_lowest_bid’)

    However when I put it in a publisher table with a where clause,

    meta_key = ‘wdm_lowest_bid’

    I get the error message, Data table warning, table ID = wp5k_postmeta10 – unknown column “wdm_lowest_bid” in ‘where clause’

    Can you give me some direction to get the publisher version working?

    Thank you,

    Jeff

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Kim L

    (@kimmyx)

    Hi @jeff41,

    Can you try this instead? Sometimes the editor messes up the single quotes.

    SELECT wp5k_postmeta.meta_id as 'Meta_id'
    , wp5k_postmeta.post_id as 'Post_id'
    , wp5k_postmeta.meta_key as 'Meta_key'
    , wp5k_postmeta.meta_value as 'Meta_value'
    FROM wp5k_postmeta
    WHERE (wp5k_postmeta.meta_key = 'wdm_lowest_bid')

    Let us know how it goes.

    Thread Starter jeff41

    (@jeff41)

    Thank you for the suggestion, Kim. Unfortunately although the error message changed, I still get the message specifically flagging the 'wdm_lowest_bid' construct when I changed it in the publisher advanced settings where clause section.

    Jeff

    Plugin Contributor Kim L

    (@kimmyx)

    Hi @jeff41,

    Thanks for the response. Could you give us the exact error message?

    Or if you also provide a screenshot of your publication setting, that would be helpful.

    In your original post, you indicated FROM wp5k_postmeta, but the error indicated table ID = wp5k_postmeta10. Is this a typo?

    We look forward to your response. 🙂

    Thread Starter jeff41

    (@jeff41)

    Thank you for getting back to me, KIm. This data publisher table did work fine last year, and I’m a little vexed why it won’t work after making a minor change in the where clause. I am using the latest version of the premium wp data access plugin, version 5.2.9.

    Not sure how to put a screen shot up on this forum, I’ve copied two screenshots from my iPad to a cloud drive and shared them below. One screenshot shows the basic publisher setting, and the other the error message I get. Hope that is some help.

    2 Items

    Jeff

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi @jeff41,

    You are using a left and right single quotation mark. Your DBMS does not understand these characters. Please make sure to use the apostrope. Use this:

    meta_key = 'wdm_lowest_bid'

    Instead of this:

    meta_key = ‘wdm_lowest_bid’

    Do you see the difference?

    See: https://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html

    Does this help?
    Peter

    Thread Starter jeff41

    (@jeff41)

    Thank you, Peter. The culprit is using my iPad rather than my computer keyboard. Apparently after the latest operating system update, the iPad is doing some manipulations behind the scene, so to speak. Even using the html substitution ' on my iPad recommended by Kim led to a different error diagnostic.

    after retyping the where clause on my computer keyboard, the publisher table works again.

    Appreciate both your and Kim’s help..

    Jeff

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

The topic ‘Unknown column in where clause’ is closed to new replies.