Have you tried using phpmyadmin with the sql and see what results it returns?