summaryrefslogtreecommitdiffstats
path: root/pbs-randomDelete.php
diff options
context:
space:
mode:
Diffstat (limited to 'pbs-randomDelete.php')
-rw-r--r--pbs-randomDelete.php65
1 files changed, 0 insertions, 65 deletions
diff --git a/pbs-randomDelete.php b/pbs-randomDelete.php
deleted file mode 100644
index c3a7014..0000000
--- a/pbs-randomDelete.php
+++ /dev/null
@@ -1,65 +0,0 @@
-<?php
-class deleteClass{
- private $link;
-
- public function __construct() {
- $this->link = mysql_connect('localhost', 'root', 'lsfks-openslx');
- if (!$this->link) {
- die('keine Verbindung möglich: ' . mysql_error());
- }
- echo 'Verbindung erfolgreich'."\n";
- mysql_select_db('pbs');
- }
-
- public function __destruct() {
- mysql_close($this->link);
- unset($this->link);
- }
-
- public function deletePerson($i){
- $anz = mysql_num_rows(mysql_query('SELECT * FROM pbs_membership WHERE personID = $i'));
- mysql_query('DELETE FROM pbs_person WHERE personID = $i;');
- if(mysql_num_rows(mysql_query("SELECT * FROM pbs_person WHERE personID = $i;") < 1)){
- if($anz > 0) {
- if(mysql_num_rows(mysql_query("SELECT * FROM pbs_membership WHERE personID = $i;")) < 1) {
- echo "Löschen erfolgreich";
- } else {
- echo "Löschen nicht erfolgreich";
- }
- } else {
- echo "Löschen erfolgreich";
- }
- } else {
- echo "Löschen nicht erfolgreich";
- }
- }
-
- public function deleteGroup($i){
-
- }
-
- public function deleteRight($i){
-
- }
-
- public function deleteRole($i){
-
- }
-
- public function deleteMemberships(){
-
- }
-
- public function deleteAll(){
- $this->deletePerson(20);
- $this->deleteGroup(10);
- $this->deleteRight(20);
- $this->deleteRole(20);
- $this->deleteMemberships();
- }
-}
-
-$u = new deleteClass();
-$u->deleteAll();
-
-