Ver Mensaje Individual
  #6 (permalink)  
Antiguo 17/03/2005, 10:07
Avatar de Seppo
Seppo
 
Fecha de Ingreso: marzo-2005
Ubicación: Buenos Aires, Argentina
Mensajes: 1.284
Antigüedad: 19 años, 11 meses
Puntos: 17
usá DATE_FORMAT, quedaría...

"SELECT * FROM tabla1 tr, tabla 2trm
WHERE trm.cdmaterial = '$cdmaterial'
AND to_days(tr.feinicio) <= to_days(date_format($fecha1,'%Y-%m-%d'))
AND to_days(tr.fefin) >= to_days(date_format($fecha1,'%Y-%m-%d'))"