$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); } ?> PR Consultants | Grapevine PR
Grapevine PR News

Card Connection Offers Rare Franchise Opportunity

19 May 2014

Leading greeting card publisher, Card Connection has announced that several franchise opportunities have recently become available. The company which last year celebrated 21 successful years in operation, has a complete franchise network in the UK so only already-established territories, purchased from an existing franchisee, ever come on the market.