<?php select sha1(concat(id,floor(UNIX_TIMESTAMP()*rand()),mail)) from mails_datos where mail="davidventura27@gmail.com"; ?>