Slay script for mysql queries