I'm trying to figure out how to update this WordPress query so that it treats the value of the "post_content_filtered" column as an integer, but so far I haven't had any luck. I believe it's because the data type for that column is set to "longtext", and since it's once of the native columns within the wp_posts table -- I'm reluctant to change the structure:
$ytd_active_listings_args = array(
'post_type' => 'wwu_ytd_active_list',
'numberposts' => '-1',
'post_status' => 'any',
'orderby' => 'post_content_filtered',
'order' => 'DESC'
$ytd_active_listings_data = get_posts( $ytd_active_listings_args );
The values that are contained within the "post_content_filtered" column are numeric -- more specifically --- dollar values -- although they DO NOT contain any dollar signs, commas or decimals. They're just in the format of "12050000", "350000", "265000", etc. I've been trying to order these rows in descending order, meaning from lowest price to highest price, .. but it appears that I've hit a brick wall. Adding additional custom fields is not an option, ... and changing the data type of the "post_content_filtered" column is also not an option. So what options remain, if any?