Fixed typo
This commit is contained in:
parent
009332dccf
commit
dddcfa7154
|
|
@ -54,7 +54,7 @@ func (s *SensorValuesService) GetList(sensor string, from int64, to int64) ([]se
|
|||
func (s *SensorValuesService) GetLatest(sensor string, to int64) (*sensorValue, error) {
|
||||
var value = sensorValue{}
|
||||
|
||||
row := s.ctx.DB.QueryRow("SELECT timestamp, value FROM sensor_values WHERE sensor = ? timestamp < ? ORDER BY timestamp DESC LIMIT 1", sensor, to)
|
||||
row := s.ctx.DB.QueryRow("SELECT timestamp, value FROM sensor_values WHERE sensor = ? AND timestamp < ? ORDER BY timestamp DESC LIMIT 1", sensor, to)
|
||||
|
||||
err := row.Scan(&value.Timestamp, &value.Value)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Reference in New Issue