mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-20 10:11:00 +00:00
Update db_MYSQL.php
This commit is contained in:
@@ -1209,12 +1209,25 @@ class MYSQL_DB {
|
|||||||
return mysql_query($q, $this->connection);
|
return mysql_query($q, $this->connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
function DeleteCat($id) {
|
function DeleteCat($id) {
|
||||||
$qs = "DELETE from " . TB_PREFIX . "forum_cat where id = '$id'";
|
$qs = "DELETE from " . TB_PREFIX . "forum_cat where id = '$id'";
|
||||||
$q = "DELETE from " . TB_PREFIX . "forum_topic where cat = '$id'";
|
$q = "DELETE from " . TB_PREFIX . "forum_topic where cat = '$id'";
|
||||||
mysql_query($qs, $this->connection);
|
$q2="SELECT id from ".TB_PREFIX."forum_topic where cat ='$id'";
|
||||||
return mysql_query($q, $this->connection);
|
$result = mysql_query($q2, $this->connection);
|
||||||
}
|
if (!empty($result)) {
|
||||||
|
$array=$this->mysql_fetch_all($result);
|
||||||
|
foreach($array as $ss) {
|
||||||
|
$this->DeleteSurvey($ss['id']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mysql_query($qs, $this->connection);
|
||||||
|
return mysql_query($q, $this->connection);
|
||||||
|
}
|
||||||
|
|
||||||
|
function DeleteSurvey($id) {
|
||||||
|
$qs = "DELETE from " . TB_PREFIX . "forum_survey where topic = '$id'";
|
||||||
|
return mysql_query($qs, $this->connection);
|
||||||
|
}
|
||||||
|
|
||||||
function DeleteTopic($id) {
|
function DeleteTopic($id) {
|
||||||
$qs = "DELETE from " . TB_PREFIX . "forum_topic where id = '$id'";
|
$qs = "DELETE from " . TB_PREFIX . "forum_topic where id = '$id'";
|
||||||
|
|||||||
Reference in New Issue
Block a user