Added validation query for mysql