2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 10:46:53 +00:00

bugfix: different types of HMS added

git-svn-id: https://svn.fhem.de/fhem/trunk@594 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinhaas 2010-03-15 10:25:54 +00:00
parent be904ae8a6
commit 18a886b0c0

View File

@ -24,7 +24,7 @@ if (! in_array($type,$supported_HMS)) show_error_type($imgmaxxhms,$imgmaxyhms,$t
if ($DBUse=="1") {
$sqlquery=mysql_query("select timestamp from history where device='".$drawhms."' and (reading='data' or reading like '%_detect') order by timestamp desc limit 1");
$sqlquery=mysql_query("select timestamp from history where device='".$drawhms."' and (reading='data' or reading like '% Detect') order by timestamp desc limit 1");
$query=mysql_fetch_object($sqlquery);
$date=str_replace(" ","_",$query->timestamp);
}
@ -85,7 +85,7 @@ if ($DBUse=="1") {
if ($DBUse=="1")
{
$array=array();
$sqlarray=mysql_query("select timestamp,event from history where device='".$drawhms."' and (reading='data' or reading like '%_detect') order by timestamp desc limit ".$logrotateHMSlines."") or die (mysql_error());
$sqlarray=mysql_query("select timestamp,event from history where device='".$drawhms."' and (reading='data' or reading like '% Detect') order by timestamp desc limit ".$logrotateHMSlines."") or die (mysql_error());
while ( $row=mysql_fetch_object($sqlarray))
{
$date=str_replace(" ","_",$row->timestamp);