1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
<?php require("configure.php");
$GalleryCatId = $_GET["GalleryCatId"]; $GalleryCatSort = $_GET["GalleryCatSort"];
// Delete db $sql = "DELETE FROM GalleryCat WHERE GalleryCatId=". $GalleryCatId ." "; mysql_query($sql); if( mysql_errno() > 0 ){ echo 'Gallery Category Delete Error:<br />'. mysql_error() .'<br />SQL: '. $sql; exit; }
$sql = "DELETE FROM GalleryDetail WHERE GalleryCatId=". $GalleryCatId ." "; mysql_query($sql); if( mysql_errno() > 0 ){ echo 'Gallery Detail Delete Error:<br />'. mysql_error() .'<br />SQL: '. $sql; exit; }
mysql_query("UPDATE GalleryCat SET GalleryCatSort = GalleryCatSort-1 WHERE GalleryCatSort >= $GalleryCatSort "); mysql_close($dbh);
header("Location: gallerycat_index.php?msg=Delete Successful");
?>
|