$currentindex $aclause ORDER BY $fieldname LIMIT 1"); $nextindex = $nextrowarray["$fieldname"]; $nextid = $nextrowarray["$idfield"]; goquery("UPDATE $tablename SET $fieldname = '$nextindex' WHERE id = '$currentid'"); goquery("UPDATE $tablename SET $fieldname = '$currentindex' WHERE id = '$nextid'"); simplifyindex($tablename,$fieldname,$idfield,$sql); } function ex_index_top ($tablename,$fieldname,$currentid,$idfield="id",$sql="") { if(strlen($sql))$wclause = "WHERE $sql"; if(strlen($sql))$aclause = "AND $sql"; goquery("UPDATE $tablename SET $fieldname = $fieldname+1 $wclause"); goquery("UPDATE $tablename SET $fieldname = 0 WHERE $idfield = $currentid"); simplifyindex($tablename,$fieldname,$idfield,$sql); } function ex_index_bottom ($tablename,$fieldname,$currentid,$idfield="id",$sql="") { //echo "sql='$sql'
"; if(strlen($sql))$wclause = "WHERE $sql"; if(strlen($sql))$aclause = "AND $sql"; $fullsql="SELECT MAX($fieldname) FROM $tablename $wclause"; $newmax = goqueryvalue($fullsql); //echo "newmax=$newmax
"; $newmax++; goquery("UPDATE $tablename SET $fieldname = $newmax WHERE $idfield = $currentid"); simplifyindex($tablename,$fieldname,$idfield,$sql); } ?> Press Releases | Grapevine PR
Grapevine PR News

The Latest Press Releases from PR consultants, Grapevine PR

01 January 1970

01 January 1970

01 January 1970

01 January 1970