$sql="SELECT updated_at FROM {$this->states_table} WHERE device_id = :devid AND state_type = :type AND uuid ".$this->getSQLOp($params,$key)." AND counter = :counter";
$sql="SELECT updated_at FROM {$this->states_table} WHERE device_id = :devid AND state_type = :type AND uuid ".$this->getSQLOp($params,$key)." AND counter = :counter";