• Resolved anefarious1

    (@anefarious1)


    Awhile back it was explained that if you simply change the name of a button and then hit “remove unused data” and the change the button name back… it will clear out the data for that particular button. That used to work great but today I tried to do it several times with no luck. Could the recent updates have changed the process?

    https://ww.wp.xz.cn/plugins/reaction-buttons/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Jakob Lenfers

    (@jakob42)

    I thought I checked all functions, maybe I missed this. I’ll try to check it soon.

    Thread Starter anefarious1

    (@anefarious1)

    Is there a different way to clear the data?

    Plugin Author Jakob Lenfers

    (@jakob42)

    MySQL:
    DELETE FROM wp_postmeta WHERE meta_key = reaction_buttons_0
    Replace 0 for the first button, 1 for the second and so on. I’ll need to rewrite the whole delete unused data stuff, not sure how and when I’ll do it yet.

    Thread Starter anefarious1

    (@anefarious1)

    I’m not proficient with MySQL but I think I’m doing exactly what you suggested. I went to the database, searched it, and here is what I got:

    MySQL returned an empty result set (i.e. zero rows). (Query took 0.0005 seconds.)

    Based on this search:

    SELECT * FROM wp_postmeta WHERE meta_key = ‘reaction_buttons_0’

    This was copied and pasted from the results.

    Thread Starter anefarious1

    (@anefarious1)

    Can I pay you to assist with this?

    Plugin Author Jakob Lenfers

    (@jakob42)

    Sorry, wouldn’t be faster then as well πŸ˜‰ But the problem was a missing underscore, try
    DELETE FROM wp_postmeta WHERE meta_key = _reaction_buttons_0

    Thread Starter anefarious1

    (@anefarious1)

    Went to database and SQL tab in PHPmyAdmin and got this:

    Error
    SQL query:

    DELETE FROM wp_postmeta WHERE meta_key = _reaction_buttons_0
    MySQL said:

    #1054 – Unknown column ‘_reaction_buttons_0’ in ‘where clause’

    Frustrating!

    Plugin Author Jakob Lenfers

    (@jakob42)

    I’m no SQL-whiz myself, it’s hard to find the right syntax on mobile…
    DELETE FROM wp_postmeta WHERE meta_key = '_reaction_buttons_0'
    probably needed to quote the where clause.

    Thread Starter anefarious1

    (@anefarious1)

    That did it! Thank you! Now it’s easy to clear out data when needed!!!

    Plugin Author Jakob Lenfers

    (@jakob42)

    Great, good to hear. Sorry it tool so long πŸ˜‰

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

The topic ‘Clearing out data’ is closed to new replies.