Answer the question
In order to leave comments, you need to log in
How to get SQL table data by multiple conditions?
Can't get table data in WP, what did I write wrong?
SELECT `meta_value`
FROM {$wpdb->postmeta}
WHERE `post_id`={$post->ID}
AND `meta_key`={$post->meta_key}
Answer the question
In order to leave comments, you need to log in
the first thing to do is to separately generate and display a request, after that, firstly, you will see what got there, and secondly, you can insert the script into the console or into the phpmyadmin and execute, maybe there is stupidly no such data there.
The output of errors and warnings is also needed so that it is clear in general what and where does not work correctly.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question