<div dir="auto">Hallo Klaus,<div dir="auto"><br></div><div dir="auto">das geht schon fast: in den Kanaldetails bekommst du mit dem Button "Daten" einen Middleware-Request für den im Frontend angezeigten Zeitraum. Wenn du dort noch &operation=delete anhängst, löscht er dir die vorher angezeigten Daten.</div><div dir="auto">Ist nur die Frage, ob bei einer Installation beim Hoster Lösch-Rechte für den DB-User eine gute Idee sind.</div><div dir="auto"><br></div><div dir="auto">Grüße</div><div dir="auto">Frank</div></div><div class="gmail_extra"><br><div class="gmail_quote">Am 24.08.2017 22:12 schrieb "Klaus Reichenecker" <<a href="mailto:kr@kr123.de">kr@kr123.de</a>>:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div lang="DE" link="#0563c1" bgcolor="#ffffff" vlink="#954f72">
<div><font size="2" face="Arial">Habe auch das Problem, das ich bei meinem Webhoster
nur 1Gb pro Datenbank habe</font></div>
<div><font size="2" face="Arial"></font> </div>
<div><font size="2" face="Arial">Wäre es nicht sinnvoll, direkt was ins Web-UI
einzubauen, um die Daten pro Kanal zu löschen?</font></div>
<div><font size="2" face="Arial">Man könnte es z.B. für den jeweils aktivierten
Zeitraum löschen?</font></div>
<div><font size="2" face="Arial"></font> </div>
<div><font size="2" face="Arial">Grüße</font></div>
<div><font size="2" face="Arial"></font> </div>
<div><font size="2" face="Arial">Klaus</font></div>
<div><font size="2" face="Arial"></font> </div>
<div><font size="2" face="Arial"></font> </div>
<blockquote style="PADDING-LEFT:5px;MARGIN-LEFT:5px;BORDER-LEFT:#000000 2px solid;PADDING-RIGHT:0px;MARGIN-RIGHT:0px" dir="ltr">
<div style="FONT:10pt arial">----- Original Message ----- </div>
<div style="BACKGROUND:#e4e4e4;FONT:10pt arial"><b>From:</b>
<a title="thomas@fambesse.de" href="mailto:thomas@fambesse.de" target="_blank">fambesse</a>
</div>
<div style="FONT:10pt arial"><b>To:</b> <a title="volkszaehler-users@demo.volkszaehler.org" href="mailto:volkszaehler-users@demo.volkszaehler.org" target="_blank">'volkszaehler.org -
users'</a> </div>
<div style="FONT:10pt arial"><b>Sent:</b> Thursday, August 24, 2017 11:44
AM</div>
<div style="FONT:10pt arial"><b>Subject:</b> Re: [vz-users] Daten aus
Datenbank löschen</div>
<div><br></div>
<div class="m_892537668489378398WordSection1">
<p class="MsoNormal"><a name="m_892537668489378398__MailEndCompose">Ja Super, <u></u><u></u></a></p>
<p class="MsoNormal"><span>hat geklappt
über die API. <u></u><u></u></span></p>
<p class="MsoNormal"><span>Das mit den
Loschen mittels SQL werde ich aber auch noch testen. <u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span>Besten dank an
alle die mir geholfen haben. <u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<div>
<p class="MsoNormal"><span><span style="FONT-FAMILY:Courier;COLOR:black">------------------------------<wbr>----------------------------</span></span><span><span style="FONT-FAMILY:"Times New Roman",serif;COLOR:black">
</span></span><span><span><u></u><u></u></span></span></p>
<p class="MsoNormal"><span><span style="FONT-FAMILY:Courier;COLOR:black">Thomas
Besse
</span></span><span><span style="FONT-FAMILY:"Times New Roman",serif;COLOR:black">
</span></span><span><span><u></u><u></u></span></span></p>
<p class="MsoNormal"><span><span style="FONT-FAMILY:Courier;COLOR:black">57250
Netphen
e-mail: </span></span><a href="mailto:thomas@fambesse.de" target="_blank"><span><span style="FONT-FAMILY:Courier">thomas@fambesse.de</span></span><span></span></a><span><span style="FONT-FAMILY:Courier;COLOR:black"> </span></span><span><span style="FONT-FAMILY:"Times New Roman",serif;COLOR:black">
</span></span><span><span><u></u><u></u></span></span></p>
<p class="MsoNormal"><span><span style="FONT-FAMILY:Courier;COLOR:black">------------------------------<wbr>----------------------------</span></span><span><span>
<u></u><u></u></span></span></p></div>
<p class="MsoNormal"><span><u></u> <u></u></span></p><span></span>
<div>
<div style="BORDER-TOP:#e1e1e1 1pt solid;BORDER-RIGHT:medium none;BORDER-BOTTOM:medium none;PADDING-BOTTOM:0cm;PADDING-TOP:3pt;PADDING-LEFT:0cm;BORDER-LEFT:medium none;PADDING-RIGHT:0cm">
<p class="MsoNormal"><b><span>Von:</span></b><span> volkszaehler-users
[mailto:<a href="mailto:volkszaehler-users-bounces@demo.volkszaehler.org" target="_blank">volkszaehler-users-<wbr>bounces@demo.volkszaehler.org</a>] <b>Im Auftrag von
</b>Friedrich Kessler<br><b>Gesendet:</b> Mittwoch, 23. August 2017
17:54<br><b>An:</b> <a href="http://volkszaehler.org" target="_blank">volkszaehler.org</a> - users
<<a href="mailto:volkszaehler-users@demo.volkszaehler.org" target="_blank">volkszaehler-users@demo.<wbr>volkszaehler.org</a>><br><b>Betreff:</b> Re:
[vz-users] Daten aus Datenbank löschen<u></u><u></u></span></p></div></div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal"><span style="FONT-SIZE:10.5pt;COLOR:black">Hallo,</span><span style="FONT-SIZE:10.5pt;COLOR:black"><u></u><u></u></span></p></div>
<div>
<p class="MsoNormal"><span style="FONT-SIZE:10.5pt;COLOR:black">Ich
exportiere Daten aus der vz DB mit diesem Script (nur bestimmte
Channels):<u></u><u></u></span></p></div>
<div>
<p class="MsoNormal"><span style="FONT-SIZE:10.5pt;COLOR:black"><u></u> <u></u></span></p></div>
<div><pre><span style="COLOR:black"> select channel_id, timestamp,value from data<u></u><u></u></span></pre><pre><span style="COLOR:black"> where from_unixtime(timestamp/1000) > ('2015-06-05 12:43:16')<u></u><u></u></span></pre><pre><span style="COLOR:black"> and from_unixtime(timestamp/1000) < ('2015-08-06 09:40:37')<u></u><u></u></span></pre><pre><span style="COLOR:black"> and channel_id > 12 and channel_id < 20<u></u><u></u></span></pre><pre><span style="COLOR:black"> INTO outfile '/tmp/last_values' fields terminated by ‚;<u></u><u></u></span></pre><pre><span style="COLOR:black"><u></u> <u></u></span></pre><pre><span style="COLOR:black">Du kannst ja die Daten vor dem löschen selektieren um zu prüfen ob es die richtigen sind:<u></u><u></u></span></pre><pre><span style="COLOR:black"> <u></u><u></u></span></pre><pre><span style="COLOR:black"> select channel_id, timestamp,value from data<u></u><u></u></span></pre><pre><span style="COLOR:black"> where from_unixtime(timestamp/1000) > ('2015-06-05 12:43:16')<u></u><u></u></span></pre><pre><span style="COLOR:black"> and from_unixtime(timestamp/1000) < ('2015-08-06 09:40:37')<u></u><u></u></span></pre><pre><span style="COLOR:black"> and channel_id > 12 and channel_id < 20;<u></u><u></u></span></pre><pre><span style="COLOR:black"><u></u> <u></u></span></pre><pre><span style="COLOR:black">Löschen:<u></u><u></u></span></pre><pre><span style="COLOR:black">delete from data<u></u><u></u></span></pre><pre><span style="COLOR:black"> where from_unixtime(timestamp/1000) > ('2015-06-05 12:43:16')<u></u><u></u></span></pre><pre><span style="COLOR:black"> and from_unixtime(timestamp/1000) < ('2015-08-06 09:40:37')<u></u><u></u></span></pre><pre><span style="COLOR:black"> and channel_id > 12 and channel_id < 20;<u></u><u></u></span></pre><pre><span style="COLOR:black"><u></u> <u></u></span></pre><pre><span style="COLOR:black">Gruss<u></u><u></u></span></pre><pre><span style="COLOR:black">Friedrich <u></u><u></u></span></pre></div>
<div>
<p class="MsoNormal"><span style="FONT-SIZE:10.5pt;COLOR:black"><u></u> <u></u></span></p></div>
<div style="BORDER-TOP:#b5c4df 1pt solid;BORDER-RIGHT:medium none;BORDER-BOTTOM:medium none;PADDING-BOTTOM:0cm;PADDING-TOP:3pt;PADDING-LEFT:0cm;BORDER-LEFT:medium none;PADDING-RIGHT:0cm">
<p class="MsoNormal"><b><span style="COLOR:black">Von: </span></b><span style="COLOR:black">fambesse <<a href="mailto:thomas@fambesse.de" target="_blank">thomas@fambesse.de</a>><br><b>Antworten
an: </b>"<a href="http://volkszaehler.org" target="_blank">volkszaehler.org</a> - users" <<a href="mailto:volkszaehler-users@demo.volkszaehler.org" target="_blank">volkszaehler-users@demo.<wbr>volkszaehler.org</a>><br><b>Datum:
</b>Mittwoch, 23. August 2017 09:42<br><b>An: </b><<a href="mailto:volkszaehler-users@lists.volkszaehler.org" target="_blank">volkszaehler-users@lists.<wbr>volkszaehler.org</a>><br><b>Betreff:
</b>[vz-users] Daten aus Datenbank löschen<u></u><u></u></span></p></div>
<div>
<p class="MsoNormal"><span style="FONT-SIZE:10.5pt;COLOR:black"><u></u> <u></u></span></p></div>
<div>
<div>
<p class="MsoNormal"><span style="COLOR:black">Hallo zusammen,
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="COLOR:black">leider ist mein SQL etwas
eingerostet und ich hoffe hier kann mir jemand helfen. <u></u><u></u></span></p>
<p class="MsoNormal"><span style="COLOR:black">Ich möchte gerne von einem Tag
bzw. zwischen zwei Tagen oder zwei Timestamps die Daten
löschen.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="COLOR:black">Hier haben sich bei mir an einem
Tag falsche Werte eingeschlichen. <u></u><u></u></span></p>
<p class="MsoNormal"><span style="COLOR:black"> <u></u><u></u></span></p>
<p class="MsoNormal"><span style="COLOR:black">Folgendes habe ich habe ich
schon probiert:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="FONT-SIZE:10pt;BORDER-TOP:windowtext 1pt;FONT-FAMILY:inherit;BORDER-RIGHT:windowtext 1pt;BACKGROUND:#eff0f1;BORDER-BOTTOM:windowtext 1pt;COLOR:#101094;PADDING-BOTTOM:0cm;PADDING-TOP:0cm;PADDING-LEFT:0cm;BORDER-LEFT:windowtext 1pt;PADDING-RIGHT:0cm"> </span><span style="COLOR:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="FONT-SIZE:10pt;BORDER-TOP:windowtext 1pt;FONT-FAMILY:inherit;BORDER-RIGHT:windowtext 1pt;BACKGROUND:#eff0f1;BORDER-BOTTOM:windowtext 1pt;COLOR:#101094;PADDING-BOTTOM:0cm;PADDING-TOP:0cm;PADDING-LEFT:0cm;BORDER-LEFT:windowtext 1pt;PADDING-RIGHT:0cm">SELECT
* FROM 'data' WHERE `timestamp` BETWEEN '1502229600' AND
'1502316000';</span><span style="COLOR:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="FONT-SIZE:10pt;BORDER-TOP:windowtext 1pt;FONT-FAMILY:inherit;BORDER-RIGHT:windowtext 1pt;BACKGROUND:#eff0f1;BORDER-BOTTOM:windowtext 1pt;COLOR:#101094;PADDING-BOTTOM:0cm;PADDING-TOP:0cm;PADDING-LEFT:0cm;BORDER-LEFT:windowtext 1pt;PADDING-RIGHT:0cm"> </span><span style="COLOR:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="COLOR:black">Die Timestamps sollten der
09.08.2017 00:00:00 bis 10.08.2017 00:00:00 sein.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="COLOR:black">Besten Dank
vorab.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="COLOR:black"> <u></u><u></u></span></p>
<p class="MsoNormal"><span style="COLOR:black"> <u></u><u></u></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY:Courier;COLOR:black">------------------------------<wbr>----------------------------</span><span style="FONT-FAMILY:"Times New Roman",serif;COLOR:black"> </span><span style="COLOR:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY:Courier;COLOR:black">Thomas
Besse
</span><span style="FONT-FAMILY:"Times New Roman",serif;COLOR:black"> </span><span style="COLOR:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY:Courier;COLOR:black">57250
Netphen
e-mail: <a href="mailto:thomas@fambesse.de" target="_blank">thomas@fambesse.de</a> </span><span style="FONT-FAMILY:"Times New Roman",serif;COLOR:black"> </span><span style="COLOR:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY:Courier;COLOR:black">------------------------------<wbr>----------------------------</span><span style="COLOR:black"> </span><span style="COLOR:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="COLOR:black"> <u></u><u></u></span></p></div></div></div></blockquote></div>
</blockquote></div></div>