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:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
|
include ('...');
$select4 = "SELECT Username, Wohnung FROM mitglieder";
$selecting4 = mysql_query($select4);
while ($row = mysql_fetch_assoc($selecting4)) {
$name = $row[Username];
$wohnung = $row[Wohnung];
include ('...');
$select4 = "SELECT Name, Preis FROM wohnungen WHERE Name='$wohnung'";
$selecting4 = mysql_query($select4);
while ($row = mysql_fetch_assoc($selecting4)) {
$preis = $row[Preis] ;
}
$neukontostand = $kontostand - $preis;
include ('...');
$update2 = "UPDATE mitglieder SET `Konto` = '$neukontostand'";
$updating2 = mysql_query($update2);
include ('...');
$insert3 = "INSERT INTO `kontoauszuege` ( `Name`, `Datum`, `Betrag` , `Grund` , `Von`)
VALUES ('$name', NOW(), '$preis', '<b>Miete<b> $wohnung', 'Bank')";
$inserting3 = mysql_query($insert3);
}
mysql_close(); |