plugin development – SQL query into to WP query

Question

I can do it from within phpmyadmin using the following SQL Query:

SELECT * FROM $wpdb->postmeta WHERE (meta_value LIKE ‘%$Job_param %’ OR meta_value LIKE ‘$Job_param’ OR meta_value LIKE ‘% $Job_param%’) AND meta_key LIKE ‘Job_tag’ “);

but I can’t get it to work from within wordpress.

Any thoughts?

Like this::

$query = new WP_Query( array(
'post_type'     => 'post',
'post_status'   => 'publish',
'post__in'      => $post_ids,

) );

0
DK Thakur 1 week 2022-09-16T02:58:30-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse