Answer the question
In order to leave comments, you need to log in
How to get a list of unique field values?
There is a table wp_postmeta
with fields
meta_id(Primary)
post_id
meta_key
meta_value
How to get a list of unique values of the meta_key field ?
Thanks
Answer the question
In order to leave comments, you need to log in
Greetings.
From the WP environment.
global $wpdb;
$result = $wpdb->get_results( "SELECT meta_value FROM table WHERE meta_key=`field name` AND post_id='post number';" );
It is better to test the request in phpMyAdmin and then insert it.
Dale print the result of the query using print_r($result);
And then write a specific appeal to the element.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question