2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

added chart rename and update queries

git-svn-id: https://svn.fhem.de/fhem/trunk@3362 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
johannnes 2013-06-29 14:32:13 +00:00
parent 2706864903
commit 4d2f6ce70b

View File

@ -971,8 +971,12 @@ sub prepareSql(@) {
$sql = $yearstats;
} elsif($userquery eq "savechart") {
$sql = "INSERT INTO frontend (TYPE, NAME, VALUE) VALUES ('savedchart', '$savename', '$jsonChartConfig')";
} elsif($userquery eq "renamechart") {
$sql = "UPDATE frontend SET NAME = '$savename' WHERE ID = '$jsonChartConfig'";
} elsif($userquery eq "deletechart") {
$sql = "DELETE FROM frontend WHERE TYPE = 'savedchart' AND ID = '".$savename."'";
} elsif($userquery eq "updatechart") {
$sql = "UPDATE frontend SET VALUE = '$jsonChartConfig' WHERE ID = '".$savename."'";
} elsif($userquery eq "getcharts") {
$sql = "SELECT * FROM frontend WHERE TYPE = 'savedchart'";
} elsif($userquery eq "getTableData") {
@ -1560,4 +1564,4 @@ sub chartQuery($@) {
</ul>
=end html_DE
=cut
=cut