The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Search
Close
AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
(SQL) Relating wp_w...
 
Share:
Notifications
Clear all

Question (SQL) Relating wp_wc_feedback_forms items to wp_comments

3 Posts
2 Users
0 Reactions
894 Views
Posts: 1
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@rocky)
New Member
Joined: 1 year ago
[#9328]

Hi - first off, fantastic product - thank you so much for this!

I'm trying to programmatically pull comments out of the WordPress SQL database.
This works well when I relate wp_posts table and wp_comments tables.

However, I'm struggling to link inline comments to content within the wp_comments table.
There doesn't seem to be a way to identify which comments relate to which inline unique_id within the wp_wc_feedback_forms table.

I assume I should be looking somewhere else? Any help would be appreciated!

Many thanks,

R


2 Replies
Asti
Posts: 8210
 Asti
Support
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@asti)
Illustrious Member
Joined: 8 years ago

Hi,

I'll ask the developers and get back to you soon. 


Reply
1 Reply
Asti
 Asti
Support
(@asti)
Joined: 8 years ago

Illustrious Member
Posts: 8210
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

Hi,

The wpdiscuz_feedback_form_id meta key in the wp_commentmeta table can be used to retrieve the IDs of the inline comment feedback forms.

SELECT * 
FROM `wp_comments` c
JOIN `wp_commentmeta` m ON c.`comment_ID` = m.`comment_id` AND m.`meta_key` = 'wpdiscuz_feedback_form_id'
JOIN `wp_wc_feedback_forms` ff ON ff.`id` = m.`meta_value`
WHERE c.`comment_post_ID` = 1
AND ff.`unique_id` = '0sdbxr5cfy'

The SQL above gets the inline comments with unique_id0sdbxr5cfy for the post ID = 1.

The wp_ is just a prefix, in your case, it may differ.


Reply
Share: