2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-12 16:46:35 +00:00

bugfix: different types of HMS added

git-svn-id: https://svn.fhem.de/fhem/trunk@593 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinhaas 2010-03-15 09:40:46 +00:00
parent 3a497b4f60
commit be904ae8a6

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' 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' 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);