I have below table filed in varchar datatype, I want get the last one hour data from table time using mysql query
I have
PHP
$total = (double) $input * (double) $rate;
return number_format((double) $total, 2);
total = parseFloat(input) * parseFloat(rate);
return total.toFixed(2);
$total = (double) $input * (double) $rate;
return number_format((double) $total, 2);
total = parseFloat(input) * parseFloat(rate);
return total.toFixed(2);
Select the rows from your table with the datetime
column value between current date and time and 1 hr before current time.
Query
select * from `your_table_name`
where `your_column_name` between date_add(now(), interval -1 hour) and now();