I can’t get them to sort beyond the FIRST number… so if there’s a property $24,000 and another $399,000 they’ll be sequential. Any suggestions? Here’s the code I’m using:
<?php
$price = get_post_meta($post->ID, ‘price’, true);
$querystr = “
SELECT * FROM $wpdb->posts
LEFT JOIN $wpdb->postmeta ON($wpdb->posts.ID = $wpdb->postmeta.post_id)
LEFT JOIN $wpdb->term_relationships ON($wpdb->posts.ID = $wpdb->term_relationships.object_id)
LEFT JOIN $wpdb->term_taxonomy ON($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id)
WHERE $wpdb->term_taxonomy.term_id = 14
AND $wpdb->term_taxonomy.taxonomy = ‘category’
AND $wpdb->posts.post_status = ‘publish’
AND $wpdb->postmeta.meta_key = ‘price’
ORDER BY $wpdb->postmeta.meta_value+0 DESC
“;
$pageposts = $wpdb->get_results($querystr, OBJECT);
?>