I am using the following code to search some data from WordPress database, but when first condition is false then OR condition is not working.
$where .= ' AND ((' . $wpdb->posts . '.post_title LIKE '.$search_term.') || ('. $wpdb->postmeta. '.meta_value LIKE '.$search_term.'))';