mysql
select dayname('2008-07-25') as giorno

php
leggiti la documentazione su date

http://it2.php.net/manual/it/function.date.php