Using $WPDB to create simple array to check against user entered value
I’m trying to get the wpdb class to read these values into an array to suit the function You could manually loop through the $results array to build the $pattern array, but a much simpler way is by using $wpdb->get_col() to get all the values of the unit_type column: $pattern = $wpdb->get_col( “SELECT unit_type from … Read more