Debug serveur stats\nDebug
This commit is contained in:
		| @@ -27,7 +27,7 @@ class db extends mysqli | ||||
| 		{ | ||||
| 			logger(ERROR, _("Connection to sql server ready"), __FILE__ . ":" . __LINE__); | ||||
| 		} | ||||
| 		$result = new mysqli_result($this); | ||||
| 		$this->result = new mysqli_result($this); | ||||
| 	} | ||||
|  | ||||
| 	function protect($string) | ||||
| @@ -47,7 +47,7 @@ class db extends mysqli | ||||
| 			$ieeeAddress = $device->ieeeAddress; | ||||
| 			//print_r($ieeeAddress); | ||||
| 			$query = "INSERT INTO logs (device, property, value) VALUES('" . $this->protect($ieeeAddress) . "', '" . $this->protect($property) . "', '" . $this->protect(bool2string($value)) . "')"; | ||||
| 			echo $query . EOL; | ||||
| 			//echo $query . EOL; | ||||
| 			if (is_numeric($value) and !empty($properties2log[$property])) | ||||
| 			{ | ||||
| 				// calculate a min/max value for storing data | ||||
| @@ -66,7 +66,7 @@ class db extends mysqli | ||||
| 				if ($value >= $oldValue - $minMax and $value <= $oldValue + $minMax) | ||||
| 				{ | ||||
| 					//echo "========>>>>>>>>>not changed" . EOL; | ||||
| 					return 0; | ||||
| 					return true; | ||||
| 				} | ||||
| 			} | ||||
| 			if ($testMode) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user