Sorting by meta_value issue
-
$sqlsort = "select ID from wp_posts left join wp_postmeta on wp_postmeta.
post_id=wp_posts.
IDleft join wp_term_relationships on wp_term_relationships.
Object_ID=wp_posts.
IDleft join wp_term_taxonomy on wp_term_taxonomy.
term_taxonomy_id= wp_term_relationships.
term_taxonomy_idleft join wp_terms on wp_terms.
term_id= wp_term_taxonomy.
term_idwhere
ID` in (“.$rxt.”) and meta_key=’price_value’ group by ID order by meta_value;”;//echo $sqlsort.”<BR>”;
$ressort = mysql_query($sqlsort);`The price sorting by meta_value is not corret.
output order become (1000, 2050, 200, 300)I tried to replace the meta_value with meta_value_num, but an error message comes up. Can any one please suggest how to solve this issue.
Thanks in advance!
- The topic ‘Sorting by meta_value issue’ is closed to new replies.