コード例 #1
0
 public function sortValues($id, $direction)
 {
     // Get current sort value
     $q = "SELECT sort_order FROM homepage_image WHERE id = " . $id;
     $r = parent::returnResultSet($q);
     $l = $r[0];
     $sortVal = $l->sort_order;
     if ($direction == 'U') {
         // Move item that is currently in the new position to this item's position
         $q = "UPDATE homepage_image SET sort_order = " . $sortVal . " WHERE sort_order = " . ($sortVal - 10);
         parent::updateQuery($q);
         // Put selected item in new position
         $q = "UPDATE homepage_image SET sort_order = " . ($sortVal - 10) . " WHERE id = " . $id;
         parent::updateQuery($q);
     } else {
         // Move item that is currently in the new position to this item's position
         $q = "UPDATE homepage_image SET sort_order = " . $sortVal . " WHERE sort_order = " . ($sortVal + 10);
         parent::updateQuery($q);
         // Put selected item in new position
         $q = "UPDATE homepage_image SET sort_order = " . ($sortVal + 10) . " WHERE id = " . $id;
         parent::updateQuery($q);
     }
 }
コード例 #2
0
ファイル: Setting.php プロジェクト: brandfeverinc/coke-cooler
 public function delete($deleteID)
 {
     $q = "DELETE FROM setting WHERE id = " . intval($deleteID);
     parent::updateQuery($q);
 }
コード例 #3
0
 public function sortValues($id, $direction)
 {
     // Get current sort value
     $q = "SELECT technology_id, sort_order FROM technology_info WHERE id = " . $id;
     $r = parent::returnresultSet($q);
     $l = $r[0];
     $sortVal = $l->sort_order;
     $technology_id = $l->technology_id;
     if ($direction == 'U') {
         // Move item that is currently in the new position to this item's position
         $q = "UPDATE technology_info SET sort_order = " . $sortVal . " WHERE technology_id = " . $technology_id . " AND sort_order = " . ($sortVal - 10);
         parent::updateQuery($q);
         // Put selected item in new position
         $q = "UPDATE technology_info SET sort_order = " . ($sortVal - 10) . " WHERE id = " . $id;
         parent::updateQuery($q);
     } else {
         // Move item that is currently in the new position to this item's position
         $q = "UPDATE technology_info SET sort_order = " . $sortVal . " WHERE technology_id = " . $technology_id . " AND sort_order = " . ($sortVal + 10);
         parent::updateQuery($q);
         // Put selected item in new position
         $q = "UPDATE technology_info SET sort_order = " . ($sortVal + 10) . " WHERE id = " . $id;
         parent::updateQuery($q);
     }
 }
コード例 #4
0
 public function delete($deleteID)
 {
     $q = "DELETE FROM item_presentation WHERE id = " . intval($deleteID);
     parent::updateQuery($q);
 }
コード例 #5
0
 public function delete($deleteID)
 {
     $q = "DELETE FROM item_image_highlight WHERE id = " . intval($deleteID);
     parent::updateQuery($q);
 }
コード例 #6
0
 public function delete($deleteID)
 {
     $q = "DELETE FROM item_info_type WHERE id = " . intval($deleteID);
     parent::updateQuery($q);
 }