git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@2930 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
johannnes
2013-03-16 17:27:24 +00:00
parent 8c8996da4b
commit 205e2825ac
2 changed files with 3 additions and 3 deletions

View File

@@ -776,7 +776,7 @@ sub prepareSql(@_) {
my ($sql, $jsonstring, $countsql);
if($userquery eq "getreadings") {
$sql = "SELECT distinct(reading) FROM current WHERE device = '".$device."'";
$sql = "SELECT distinct(reading) FROM history WHERE device = '".$device."'";
} elsif($userquery eq "getdevices") {
$sql = "SELECT distinct(device) FROM history";
} elsif($userquery eq "timerange") {
@@ -808,7 +808,7 @@ sub chartQuery($@) {
my ($sql, $countsql) = prepareSql(@_);
if ($sql eq "error") {
return jsonError("Could not setup SQL String");
return jsonError("Could not setup SQL String. Maybe the Database is busy, please try again!");
}
my ($hash, @a) = @_;
my $dbhf= $hash->{DBHF};