Fixed mysql querys after codestyling