I'm using this code.
$blog_list = $wpdb->get_results( "SELECT " . $extra . "blog_id, last_updated FROM " . $wpdb->blogs. " WHERE public = '1' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted ='0' AND UPPER(blog_name) LIKE 'A%'" . $order . " " . $limit . "", ARRAY_A );
But that LIKE statement AND UPPER(blog_name) LIKE 'A%'" not working. Can anyone give me the solution?
Thanks
Update:
Actually i'm using this code
$where = '';
if ($filter) {
$where = "AND UPPER(blog_name) LIKE '".strtoupper($filter)."%' ";
}
So i'll replace AND UPPER(blog_name) LIKE 'A%'" with $where later
Note: I have 500+ blogs in my network.
I want to display all blog names with anchor link in a page. But I don't want to load all the blog names. So I'm trying to achieve alphabetical navigation. If the user click link "A" then the page should display Blog names starts with "A". Likewise B, C, etc.
Here is the full code if anyone interested

The problem is that you will won't be able to search from the beginning of the string. So you'll get every blog that contains an A in it's name. I'm trying this one instead of querying mysql. I'm trying to implement it for more than 20 hours So please help me if you can. Thanks – Giri Feb 11 '12 at 18:56