Ver original$date = date('d.m.Y');$query = sprintf("SELECT SUM(valor) FROM "tu_tabla" WHERE fecha = '%s'",mysql_real_escape_string($date));