Ti suggerisco di iniziare leggendo il manuale ufficiale:

http://www.php.net/strtoupper
http://www.php.net/strtolower

Oppure, direttamente in MySQL:

http://dev.mysql.com/doc/refman/5.1/...function_upper
http://dev.mysql.com/doc/refman/5.1/...function_lower