Please someone help me out..!!
im using wordpress in that i want to display posts order by meta value, but my code gives me only posts which are having meta value. but i want all posts which are having meta value and which are not, only difference is need to show all posts above which are having meta value. following is my code :
$query= mysql_query("SELECT m.meta_key,m.meta_value,c.ID,c.post_date,c.post_title,c.post_name,c.post_content,c.post_author,u.object_id,u.term_taxonomy_id FROM wp_posts c, wp_term_relationships u,wp_postmeta m WHERE c.ID=u.object_id and u.term_taxonomy_id='$taxonomy' and m.meta_key='priority' and m.post_id=c.ID and post_status='publish' order by meta_value DESC") or die(mysql_error());
:confused: