thanks for your reply.
i am not looking for above solution. i am looking for short script for this.
why because i am not displaying only two(A,B) directories.
i am displaying (A-z) directories. for that i will write 26 querys for each directory as you said. i am looking for short codes for this solution.
is there any solution to do this ?