mySQL script generation works