Update query should be an UPDATE, not a SELECT.
authorTilghman Lesher <tilghman@meg.abyt.es>
Mon, 22 Mar 2010 19:05:27 +0000 (19:05 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Mon, 22 Mar 2010 19:05:27 +0000 (19:05 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@253758 65c4cc65-6c06-0410-ace0-fbb531ad65f3

contrib/scripts/dbsep.cgi

index 0705aa6..d15390c 100755 (executable)
@@ -99,7 +99,7 @@ if ($mode eq 'single') {
                }
                $get{$name}++;
        }
-       $sql = "SELECT " . join(",", cgi_to_where_clause($cgi, \%cfg, \%get)) . " FROM $table WHERE " . join(" AND ", @get);
+       $sql = "UPDATE $table SET " . join(",", cgi_to_where_clause($cgi, \%cfg, \%get)) . " WHERE " . join(" AND ", @get);
        $dbh = DBI->connect($cfg{dsn}, $cfg{dbuser}, $cfg{dbpass});
        $affected = $dbh->do($sql);
        $dbh->disconnect();