INput database with if