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); } }
public function delete($deleteID) { $q = "DELETE FROM setting WHERE id = " . intval($deleteID); parent::updateQuery($q); }
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); } }
public function delete($deleteID) { $q = "DELETE FROM item_presentation WHERE id = " . intval($deleteID); parent::updateQuery($q); }
public function delete($deleteID) { $q = "DELETE FROM item_image_highlight WHERE id = " . intval($deleteID); parent::updateQuery($q); }
public function delete($deleteID) { $q = "DELETE FROM item_info_type WHERE id = " . intval($deleteID); parent::updateQuery($q); }