fixed a postgres problem with moveCollateralDown and moveCollateralUp in the wobject superclass.

This commit is contained in:
JT Smith 2003-03-11 01:35:32 +00:00
parent e6de18d747
commit 2b7b9ea4d2

View file

@ -499,7 +499,7 @@ sub moveCollateralDown {
$setValue = $_[5] || $_[0]->get($setName);
($seq) = WebGUI::SQL->quickArray("select sequenceNumber from $_[1] where $_[2]=$_[3] and $setName=".quote($setValue));
($id) = WebGUI::SQL->quickArray("select $_[2] from $_[1] where $setName=".quote($setValue)
." and sequenceNumber=$seq+1 group by $setName");
." and sequenceNumber=$seq+1");
if ($id ne "") {
WebGUI::SQL->write("update $_[1] set sequenceNumber=sequenceNumber+1 where $_[2]=$_[3] and $setName="
.quote($setValue));
@ -549,7 +549,7 @@ sub moveCollateralUp {
$setValue = $_[5] || $_[0]->get($setName);
($seq) = WebGUI::SQL->quickArray("select sequenceNumber from $_[1] where $_[2]=$_[3] and $setName=".quote($setValue));
($id) = WebGUI::SQL->quickArray("select $_[2] from $_[1] where $setName=".quote($setValue)
." and sequenceNumber=$seq-1 group by $setName");
." and sequenceNumber=$seq-1");
if ($id ne "") {
WebGUI::SQL->write("update $_[1] set sequenceNumber=sequenceNumber-1 where $_[2]=$_[3] and $setName="
.quote($setValue));