Gracias nano por tu respuesta, bueno te cuento que no me da resultado, la ejecuto tal como tu me dices:
Código PHP:
select fecha, TIMEDIFF(DATE_FORMAT(NOW(),'%Y-%m-%d %H:%i:%s'),DATE_FORMAT(fecha,'%Y-%m-%d %H:%i:%s')) as Minutos, now() as HORA_ACTUAL
from noticias
where estado='1' AND TIMEDIFF(DATE_FORMAT(NOW(),'%Y-%m-%d %H:%i:%s'),DATE_FORMAT(fecha,'%Y-%m-%d %H:%i:%s')) = '168:00:00' ORDER BY fecha DESC
pero de esta forma no me tira ningun error ni tampoco ningun resultado.
ahora le quite el where estado='1' quedandome asi la llamada:
Código PHP:
select fecha, TIMEDIFF(DATE_FORMAT(NOW(),'%Y-%m-%d %H:%i:%s'),DATE_FORMAT(fecha,'%Y-%m-%d %H:%i:%s')) as Minutos, now() as HORA_ACTUAL
from pornoticias AND TIMEDIFF(DATE_FORMAT(NOW(),'%Y-%m-%d %H:%i:%s'),DATE_FORMAT(fecha,'%Y-%m-%d %H:%i:%s')) = '168:00:00' ORDER BY fecha DESC
y me tira el siguiente error:
Código:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND TIMEDIFF(DATE_FORMAT(NOW(),'%Y-%m-%d %H:%i:%s'),DATE_FORMAT(
Un saludo y gracias