[php]<?php
global $wpdb, $post;
$results = $wpdb->get_results(
"
SELECT * FROM $wpdb->posts
WHERE post_title LIKE '$mo%'
AND post_type = 'movies'
AND post_status = 'publish';
"
);
sort( $results );
if ( $results ) {
foreach ( $results as $post ) {
setup_postdata ( $post );
?> [/php]
I have no Idea why this doesn’t sort my results out alphabetically.
any help appreciated