I use the next code to retrieve data from a table in the database:
$check_sql = \'SELECT personID, name, DATE_FORMAT(persons.birthdate, \"%d de %M, %Y\"), bi
SET lc_time_names = 'es_PE'; SELECT *, DATE_FORMAT(fecha,'%d de') AS dia, DATE_FORMAT(fecha,'%M %Y') AS mes FROM t_eventos4