$db_item = $wpdb->get_results($wpdb->prepare( "SELECT * FROM wp_wowhead_items WHERE name LIKE %s", "%". "Hello" . "%") );
This above one works... But the below one doesn't work!
$text = "Hello";
$db_item = $wpdb->get_results($wpdb->prepare( "SELECT * FROM wp_wowhead_items WHERE name LIKE %s", "%". $text . "%") );
Where am I missing the syntax? I tried almost every combination with quotes, slashes, escapes...
"%$text%"