Blame | Letzte Änderung | Log anzeigen | RSS feed
#!/usr/bin/perluse DBI;#my $db = DBI->connect('DBI:mysql:content_management','root','k-gg-4-y-zz');my $db = DBI->connect('DBI:mysql:content_management','admin','WE-nw-1044');my $query = "select distinct webs.datenbank from webs_properties,webs where (webs_properties.properties between 220 and 225) and (webs.ID = webs_properties.webs)";my $db_output = $db->prepare($query);$db_output->execute;while (@wert=$db_output->fetchrow_array){for ($i = 1; $i <= 8; $i++){$condition="(autoupdate".$i." < NOW()) and (autoupdate".$i." > '0000-00-00 00:00:00')";$update_query="update $wert[0].artikel set letzte_Aenderung_von = concat(letzte_Aenderung_von,' (autoupdate)') where (letzte_Aenderung_von not like '%(autoupdate)') and ".$condition;$db->do("$update_query") || print $db->errstr;$update_query="update $wert[0].artikel set preis".$i."=preis_neu".$i.", preis_neu".$i."='NULL', autoupdate".$i." = '0000-00-00 00:00:00' where ".$condition;$db->do("$update_query") || print $db->errstr;}}$db->disconnect;