sql >> Base de Datos >  >> RDS >> Mysql

¿Podemos usar la función PHP strtotime en Mysql Query?

Tu código debe ser este:

$result = "select * from table 
              where unix_timestamp(Date) >= unix_timestamp(".$_POST[DateFrom1].")  
&& unix_timestamp(Date) <= unix_timestamp(".$_POST[DateTo1].")";

Para convertir fecha en marca de tiempo en mysql hay una función unix_timestamp .