I am building a plugin in WordPress and $wpdb queries works on local, but when I upload the code to the server it doesn't work.
Here is the code that I'm using:
<?php
global $wpdb;
$resultado = $wpdb->get_results(
$wpdb->prepare(
"SELECT meta_value FROM wp_postmeta WHERE meta_key='keywords'",
OBJECT
)
);
$keywords = implode(',', array_column($resultado, "meta_value"));
?>