Web Software Installer: Wrong SQL query