[asterisk-commits] tilghman: trunk r253758 - /trunk/contrib/scripts/dbsep.cgi

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Mar 22 14:05:30 CDT 2010


Author: tilghman
Date: Mon Mar 22 14:05:27 2010
New Revision: 253758

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=253758
Log:
Update query should be an UPDATE, not a SELECT.

Modified:
    trunk/contrib/scripts/dbsep.cgi

Modified: trunk/contrib/scripts/dbsep.cgi
URL: http://svnview.digium.com/svn/asterisk/trunk/contrib/scripts/dbsep.cgi?view=diff&rev=253758&r1=253757&r2=253758
==============================================================================
--- trunk/contrib/scripts/dbsep.cgi (original)
+++ trunk/contrib/scripts/dbsep.cgi Mon Mar 22 14:05:27 2010
@@ -99,7 +99,7 @@
 		}
 		$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();




More information about the asterisk-commits mailing list