<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de-AT">
	<id>https://mediawiki.fernfh.ac.at/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Datenbankintegration_%28Webdevelopment%29</id>
	<title>Datenbankintegration (Webdevelopment) - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="https://mediawiki.fernfh.ac.at/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Datenbankintegration_%28Webdevelopment%29"/>
	<link rel="alternate" type="text/html" href="https://mediawiki.fernfh.ac.at/mediawiki/index.php?title=Datenbankintegration_(Webdevelopment)&amp;action=history"/>
	<updated>2026-05-20T07:44:59Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in FernFH MediaWiki</subtitle>
	<generator>MediaWiki 1.37.0</generator>
	<entry>
		<id>https://mediawiki.fernfh.ac.at/mediawiki/index.php?title=Datenbankintegration_(Webdevelopment)&amp;diff=6577&amp;oldid=prev</id>
		<title>Völkl Anna am 16. Mai 2025 um 20:53 Uhr</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.fernfh.ac.at/mediawiki/index.php?title=Datenbankintegration_(Webdevelopment)&amp;diff=6577&amp;oldid=prev"/>
		<updated>2025-05-16T20:53:49Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://mediawiki.fernfh.ac.at/mediawiki/index.php?title=Datenbankintegration_(Webdevelopment)&amp;amp;diff=6577&amp;amp;oldid=6576&quot;&gt;Änderungen zeigen&lt;/a&gt;</summary>
		<author><name>Völkl Anna</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.fernfh.ac.at/mediawiki/index.php?title=Datenbankintegration_(Webdevelopment)&amp;diff=6576&amp;oldid=prev</id>
		<title>Völkl Anna am 1. Mai 2025 um 13:18 Uhr</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.fernfh.ac.at/mediawiki/index.php?title=Datenbankintegration_(Webdevelopment)&amp;diff=6576&amp;oldid=prev"/>
		<updated>2025-05-01T13:18:17Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://mediawiki.fernfh.ac.at/mediawiki/index.php?title=Datenbankintegration_(Webdevelopment)&amp;amp;diff=6576&amp;amp;oldid=6575&quot;&gt;Änderungen zeigen&lt;/a&gt;</summary>
		<author><name>Völkl Anna</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.fernfh.ac.at/mediawiki/index.php?title=Datenbankintegration_(Webdevelopment)&amp;diff=6575&amp;oldid=prev</id>
		<title>Völkl Anna am 1. Mai 2025 um 13:13 Uhr</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.fernfh.ac.at/mediawiki/index.php?title=Datenbankintegration_(Webdevelopment)&amp;diff=6575&amp;oldid=prev"/>
		<updated>2025-05-01T13:13:00Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;de-AT&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version vom 1. Mai 2025, 13:13 Uhr&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l746&quot;&gt;Zeile 746:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 746:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Die Integration von Datenbanken ist ein zentraler Aspekt der PHP-Webentwicklung. Dieses Kapitel hat die Grundlagen für die Interaktion mit MySQL-Datenbanken gelegt. Hier sind die wichtigsten Punkte und Best Practices zusammengefasst:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Die Integration von Datenbanken ist ein zentraler Aspekt der PHP-Webentwicklung. Dieses Kapitel hat die Grundlagen für die Interaktion mit MySQL-Datenbanken gelegt. Hier sind die wichtigsten Punkte und Best Practices zusammengefasst:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/del&gt;&amp;#039;&amp;#039;&amp;#039;Wahl der Erweiterung:&amp;#039;&amp;#039;&amp;#039; Verwenden Sie ausschließlich die modernen Erweiterungen &amp;#039;&amp;#039;&amp;#039;PDO&amp;#039;&amp;#039;&amp;#039; oder &amp;#039;&amp;#039;&amp;#039;MySQLi&amp;#039;&amp;#039;&amp;#039;.[2, 29, 5, 15]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Wahl der Erweiterung:&amp;#039;&amp;#039;&amp;#039; Verwenden Sie ausschließlich die modernen Erweiterungen &amp;#039;&amp;#039;&amp;#039;PDO&amp;#039;&amp;#039;&amp;#039; oder &amp;#039;&amp;#039;&amp;#039;MySQLi&amp;#039;&amp;#039;&amp;#039;.[2, 29, 5, 15]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;PDO&amp;#039;&amp;#039;&amp;#039; wird generell für neue Projekte empfohlen, da es Datenbankunabhängigkeit bietet und eine konsistentere, oft als einfacher empfundene API (insbesondere bei der Parameterbindung) hat.[16, 3, 64]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;PDO&amp;#039;&amp;#039;&amp;#039; wird generell für neue Projekte empfohlen, da es Datenbankunabhängigkeit bietet und eine konsistentere, oft als einfacher empfundene API (insbesondere bei der Parameterbindung) hat.[16, 3, 64]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;MySQLi&amp;#039;&amp;#039;&amp;#039; ist eine gute Wahl, wenn ausschließlich mit MySQL gearbeitet wird und spezifische MySQL-Funktionen benötigt werden oder wenn eine prozedurale Schnittstelle bevorzugt wird.[15]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;MySQLi&amp;#039;&amp;#039;&amp;#039; ist eine gute Wahl, wenn ausschließlich mit MySQL gearbeitet wird und spezifische MySQL-Funktionen benötigt werden oder wenn eine prozedurale Schnittstelle bevorzugt wird.[15]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Prepared Statements:&amp;#039;&amp;#039;&amp;#039; Dies ist die wichtigste Sicherheitsmaßnahme. Verwenden Sie Prepared Statements immer dann, wenn externe Daten (Benutzereingaben, URL-Parameter etc.) Teil einer SQL-Abfrage werden (insbesondere bei &amp;lt;code&amp;gt;WHERE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;INSERT&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;UPDATE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;DELETE&amp;lt;/code&amp;gt;).[2, 25, 5] Sie verhindern SQL Injection zuverlässig durch die Trennung von Code und Daten.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Prepared Statements:&amp;#039;&amp;#039;&amp;#039; Dies ist die wichtigste Sicherheitsmaßnahme. Verwenden Sie Prepared Statements immer dann, wenn externe Daten (Benutzereingaben, URL-Parameter etc.) Teil einer SQL-Abfrage werden (insbesondere bei &amp;lt;code&amp;gt;WHERE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;INSERT&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;UPDATE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;DELETE&amp;lt;/code&amp;gt;).[2, 25, 5] Sie verhindern SQL Injection zuverlässig durch die Trennung von Code und Daten.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;#039;&amp;#039;&amp;#039;Sichere Fehlerbehandlung:&amp;#039;&amp;#039;&amp;#039; Konfigurieren Sie PDO (&amp;lt;code&amp;gt;PDO::ATTR_ERRMODE =&amp;amp;gt; PDO::ERRMODE_EXCEPTION&amp;lt;/code&amp;gt;) oder MySQLi (&amp;lt;code&amp;gt;mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT)&amp;lt;/code&amp;gt;) so, dass Fehler als Exceptions behandelt werden.[1, 18] Fangen Sie diese Exceptions ab und loggen Sie detaillierte Fehlermeldungen serverseitig, anstatt sie dem Benutzer anzuzeigen.[20, 5]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;#039;&amp;#039;&amp;#039;Sichere Fehlerbehandlung:&amp;#039;&amp;#039;&amp;#039; Konfigurieren Sie PDO (&amp;lt;code&amp;gt;PDO::ATTR_ERRMODE =&amp;amp;gt; PDO::ERRMODE_EXCEPTION&amp;lt;/code&amp;gt;) oder MySQLi (&amp;lt;code&amp;gt;mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT)&amp;lt;/code&amp;gt;) so, dass Fehler als Exceptions behandelt werden.[1, 18] Fangen Sie diese Exceptions ab und loggen Sie detaillierte Fehlermeldungen serverseitig, anstatt sie dem Benutzer anzuzeigen.[20, 5]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Input Validation:&amp;#039;&amp;#039;&amp;#039; Validieren Sie alle Benutzereingaben serverseitig auf Typ, Format und erlaubte Werte, bevor Sie sie an die Datenbank übergeben. Dies ist eine wichtige zusätzliche Schutzschicht.[4, 5]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Input Validation:&amp;#039;&amp;#039;&amp;#039; Validieren Sie alle Benutzereingaben serverseitig auf Typ, Format und erlaubte Werte, bevor Sie sie an die Datenbank übergeben. Dies ist eine wichtige zusätzliche Schutzschicht.[4, 5]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Prinzip der geringsten Rechte (Least Privilege):&amp;#039;&amp;#039;&amp;#039; Der Datenbankbenutzer, den Ihre PHP-Anwendung verwendet, sollte nur die minimal notwendigen Berechtigungen für seine Aufgaben besitzen.[5]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Prinzip der geringsten Rechte (Least Privilege):&amp;#039;&amp;#039;&amp;#039; Der Datenbankbenutzer, den Ihre PHP-Anwendung verwendet, sollte nur die minimal notwendigen Berechtigungen für seine Aufgaben besitzen.[5]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Sichere Zugangsdaten:&amp;#039;&amp;#039;&amp;#039; Speichern Sie Datenbank-Credentials (Hostname, Benutzername, Passwort) niemals direkt im PHP-Code oder in Dateien innerhalb des Web-Roots.[20, 65] Verwenden Sie stattdessen Konfigurationsdateien außerhalb des öffentlich zugänglichen Bereichs oder Umgebungsvariablen.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Sichere Zugangsdaten:&amp;#039;&amp;#039;&amp;#039; Speichern Sie Datenbank-Credentials (Hostname, Benutzername, Passwort) niemals direkt im PHP-Code oder in Dateien innerhalb des Web-Roots.[20, 65] Verwenden Sie stattdessen Konfigurationsdateien außerhalb des öffentlich zugänglichen Bereichs oder Umgebungsvariablen.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Code-Struktur:&amp;#039;&amp;#039;&amp;#039; Kapseln Sie Datenbankverbindungslogik und wiederkehrende Abfragen in Funktionen oder Klassen, um die Wartbarkeit und Wiederverwendbarkeit zu verbessern.[20]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Code-Struktur:&amp;#039;&amp;#039;&amp;#039; Kapseln Sie Datenbankverbindungslogik und wiederkehrende Abfragen in Funktionen oder Klassen, um die Wartbarkeit und Wiederverwendbarkeit zu verbessern.[20]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Effizienz:&amp;#039;&amp;#039;&amp;#039; Laden Sie große Ergebnismengen nicht komplett in den Speicher (&amp;lt;code&amp;gt;fetchAll&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;fetch_all&amp;lt;/code&amp;gt;). Verwenden Sie stattdessen zeilenweise Verarbeitung (&amp;lt;code&amp;gt;while&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;fetch&amp;lt;/code&amp;gt;) oder Iteratoren (PDO mit PHP 8+).[37, 40] Nutzen Sie persistente Verbindungen nur nach sorgfältiger Abwägung der Vor- und Nachteile.[7, 27]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Effizienz:&amp;#039;&amp;#039;&amp;#039; Laden Sie große Ergebnismengen nicht komplett in den Speicher (&amp;lt;code&amp;gt;fetchAll&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;fetch_all&amp;lt;/code&amp;gt;). Verwenden Sie stattdessen zeilenweise Verarbeitung (&amp;lt;code&amp;gt;while&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;fetch&amp;lt;/code&amp;gt;) oder Iteratoren (PDO mit PHP 8+).[37, 40] Nutzen Sie persistente Verbindungen nur nach sorgfältiger Abwägung der Vor- und Nachteile.[7, 27]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Defense-in-Depth:&amp;#039;&amp;#039;&amp;#039; Betrachten Sie Sicherheit als Gesamtkonzept. Die Kombination aus der richtigen API-Wahl, konsequenten Prepared Statements, Eingabevalidierung, minimalen Rechten, sicherer Fehlerbehandlung, sicherer Speicherung von Zugangsdaten und regelmäßigen Software-Updates bildet eine robuste Verteidigung.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Defense-in-Depth:&amp;#039;&amp;#039;&amp;#039; Betrachten Sie Sicherheit als Gesamtkonzept. Die Kombination aus der richtigen API-Wahl, konsequenten Prepared Statements, Eingabevalidierung, minimalen Rechten, sicherer Fehlerbehandlung, sicherer Speicherung von Zugangsdaten und regelmäßigen Software-Updates bildet eine robuste Verteidigung.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Völkl Anna</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.fernfh.ac.at/mediawiki/index.php?title=Datenbankintegration_(Webdevelopment)&amp;diff=6574&amp;oldid=prev</id>
		<title>Völkl Anna am 1. Mai 2025 um 13:12 Uhr</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.fernfh.ac.at/mediawiki/index.php?title=Datenbankintegration_(Webdevelopment)&amp;diff=6574&amp;oldid=prev"/>
		<updated>2025-05-01T13:12:06Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;de-AT&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version vom 1. Mai 2025, 13:12 Uhr&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l43&quot;&gt;Zeile 43:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 43:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;Code-Beispiel (PDO-Verbindung zu MySQL):&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;Code-Beispiel (PDO-Verbindung zu MySQL):&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;!--&lt;/del&gt;?php$host = &amp;#039;localhost&amp;#039;;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;lt;&lt;/ins&gt;?php&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$host = &amp;#039;localhost&amp;#039;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$dbname = &amp;#039;meine_datenbank&amp;#039;;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$dbname = &amp;#039;meine_datenbank&amp;#039;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$username = &amp;#039;mein_benutzer&amp;#039;;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$username = &amp;#039;mein_benutzer&amp;#039;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l53&quot;&gt;Zeile 53:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 54:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;try {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;try {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;     &lt;/del&gt;$pdo = new PDO($dsn, $username, $password, $options);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/ins&gt;$pdo = new PDO($dsn, $username, $password, $options);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;     &lt;/del&gt;// Erfolgreich verbunden, $pdo-Objekt kann nun verwendet werden.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/ins&gt;// Erfolgreich verbunden, $pdo-Objekt kann nun verwendet werden.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;     &lt;/del&gt;// echo &amp;quot;Verbindung erfolgreich hergestellt!&amp;quot;;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/ins&gt;// echo &amp;quot;Verbindung erfolgreich hergestellt!&amp;quot;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;} catch (\PDOException $e) {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;} catch (\PDOException $e) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;     &lt;/del&gt;// Fehler beim Verbindungsaufbau&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/ins&gt;// Fehler beim Verbindungsaufbau&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;     &lt;/del&gt;// In Produktion: Fehler loggen, statt ausgeben&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/ins&gt;// In Produktion: Fehler loggen, statt ausgeben&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;     &lt;/del&gt;error_log(&amp;quot;Datenbankverbindungsfehler: &amp;quot;. $e---&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;gt;&lt;/del&gt;getMessage());&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/ins&gt;error_log(&amp;quot;Datenbankverbindungsfehler: &amp;quot;. $e---&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;gt;&lt;/ins&gt;getMessage());&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  die(&amp;quot;Es gab ein Problem mit der Datenbankverbindung. Bitte versuchen Sie es später erneut.&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  die(&amp;quot;Es gab ein Problem mit der Datenbankverbindung. Bitte versuchen Sie es später erneut.&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l88&quot;&gt;Zeile 88:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 89:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** &amp;#039;&amp;#039;&amp;#039;Objektorientiert (mit Exception-Handling):&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** &amp;#039;&amp;#039;&amp;#039;Objektorientiert (mit Exception-Handling):&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;!--&lt;/del&gt;?php$host = &amp;#039;localhost&amp;#039;;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;lt;&lt;/ins&gt;?php&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$host = &amp;#039;localhost&amp;#039;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$user = &amp;#039;mein_benutzer&amp;#039;;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$user = &amp;#039;mein_benutzer&amp;#039;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$pass = &amp;#039;mein_passwort&amp;#039;;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$pass = &amp;#039;mein_passwort&amp;#039;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l97&quot;&gt;Zeile 97:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 99:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;try {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;try {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;    &lt;/del&gt;$mysqli = new mysqli($host, $user, $pass, $db);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/ins&gt;$mysqli = new mysqli($host, $user, $pass, $db);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;    &lt;/del&gt;// Zeichensatz setzen (wichtig!)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/ins&gt;// Zeichensatz setzen (wichtig!)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;    &lt;/del&gt;$mysqli---&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;gt;&lt;/del&gt;set_charset(&amp;#039;utf8mb4&amp;#039;);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/ins&gt;$mysqli---&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;gt;&lt;/ins&gt;set_charset(&amp;#039;utf8mb4&amp;#039;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  // Erfolgreich verbunden&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  // Erfolgreich verbunden&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  // echo &amp;quot;Verbindung erfolgreich (OO)! Host-Info: &amp;quot;. $mysqli-&amp;amp;gt;host_info;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  // echo &amp;quot;Verbindung erfolgreich (OO)! Host-Info: &amp;quot;. $mysqli-&amp;amp;gt;host_info;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l744&quot;&gt;Zeile 744:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 746:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Die Integration von Datenbanken ist ein zentraler Aspekt der PHP-Webentwicklung. Dieses Kapitel hat die Grundlagen für die Interaktion mit MySQL-Datenbanken gelegt. Hier sind die wichtigsten Punkte und Best Practices zusammengefasst:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Die Integration von Datenbanken ist ein zentraler Aspekt der PHP-Webentwicklung. Dieses Kapitel hat die Grundlagen für die Interaktion mit MySQL-Datenbanken gelegt. Hier sind die wichtigsten Punkte und Best Practices zusammengefasst:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*** &lt;/del&gt;&amp;#039;&amp;#039;&amp;#039;Wahl der Erweiterung:&amp;#039;&amp;#039;&amp;#039; Verwenden Sie ausschließlich die modernen Erweiterungen &amp;#039;&amp;#039;&amp;#039;PDO&amp;#039;&amp;#039;&amp;#039; oder &amp;#039;&amp;#039;&amp;#039;MySQLi&amp;#039;&amp;#039;&amp;#039;.[2, 29, 5, 15]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/ins&gt;&amp;#039;&amp;#039;&amp;#039;Wahl der Erweiterung:&amp;#039;&amp;#039;&amp;#039; Verwenden Sie ausschließlich die modernen Erweiterungen &amp;#039;&amp;#039;&amp;#039;PDO&amp;#039;&amp;#039;&amp;#039; oder &amp;#039;&amp;#039;&amp;#039;MySQLi&amp;#039;&amp;#039;&amp;#039;.[2, 29, 5, 15]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;***&lt;/del&gt;* &amp;#039;&amp;#039;&amp;#039;PDO&amp;#039;&amp;#039;&amp;#039; wird generell für neue Projekte empfohlen, da es Datenbankunabhängigkeit bietet und eine konsistentere, oft als einfacher empfundene API (insbesondere bei der Parameterbindung) hat.[16, 3, 64]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;PDO&amp;#039;&amp;#039;&amp;#039; wird generell für neue Projekte empfohlen, da es Datenbankunabhängigkeit bietet und eine konsistentere, oft als einfacher empfundene API (insbesondere bei der Parameterbindung) hat.[16, 3, 64]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;***&lt;/del&gt;* &amp;#039;&amp;#039;&amp;#039;MySQLi&amp;#039;&amp;#039;&amp;#039; ist eine gute Wahl, wenn ausschließlich mit MySQL gearbeitet wird und spezifische MySQL-Funktionen benötigt werden oder wenn eine prozedurale Schnittstelle bevorzugt wird.[15]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;MySQLi&amp;#039;&amp;#039;&amp;#039; ist eine gute Wahl, wenn ausschließlich mit MySQL gearbeitet wird und spezifische MySQL-Funktionen benötigt werden oder wenn eine prozedurale Schnittstelle bevorzugt wird.[15]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*** &lt;/del&gt;&amp;#039;&amp;#039;&amp;#039;Prepared Statements:&amp;#039;&amp;#039;&amp;#039; Dies ist die wichtigste Sicherheitsmaßnahme. Verwenden Sie Prepared Statements immer dann, wenn externe Daten (Benutzereingaben, URL-Parameter etc.) Teil einer SQL-Abfrage werden (insbesondere bei &amp;lt;code&amp;gt;WHERE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;INSERT&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;UPDATE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;DELETE&amp;lt;/code&amp;gt;).[2, 25, 5] Sie verhindern SQL Injection zuverlässig durch die Trennung von Code und Daten.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Prepared Statements:&amp;#039;&amp;#039;&amp;#039; Dies ist die wichtigste Sicherheitsmaßnahme. Verwenden Sie Prepared Statements immer dann, wenn externe Daten (Benutzereingaben, URL-Parameter etc.) Teil einer SQL-Abfrage werden (insbesondere bei &amp;lt;code&amp;gt;WHERE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;INSERT&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;UPDATE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;DELETE&amp;lt;/code&amp;gt;).[2, 25, 5] Sie verhindern SQL Injection zuverlässig durch die Trennung von Code und Daten.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*** &lt;/del&gt;&amp;#039;&amp;#039;&amp;#039;Sichere Fehlerbehandlung:&amp;#039;&amp;#039;&amp;#039; Konfigurieren Sie PDO (&amp;lt;code&amp;gt;PDO::ATTR_ERRMODE =&amp;amp;gt; PDO::ERRMODE_EXCEPTION&amp;lt;/code&amp;gt;) oder MySQLi (&amp;lt;code&amp;gt;mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT)&amp;lt;/code&amp;gt;) so, dass Fehler als Exceptions behandelt werden.[1, 18] Fangen Sie diese Exceptions ab und loggen Sie detaillierte Fehlermeldungen serverseitig, anstatt sie dem Benutzer anzuzeigen.[20, 5]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/ins&gt;&amp;#039;&amp;#039;&amp;#039;Sichere Fehlerbehandlung:&amp;#039;&amp;#039;&amp;#039; Konfigurieren Sie PDO (&amp;lt;code&amp;gt;PDO::ATTR_ERRMODE =&amp;amp;gt; PDO::ERRMODE_EXCEPTION&amp;lt;/code&amp;gt;) oder MySQLi (&amp;lt;code&amp;gt;mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT)&amp;lt;/code&amp;gt;) so, dass Fehler als Exceptions behandelt werden.[1, 18] Fangen Sie diese Exceptions ab und loggen Sie detaillierte Fehlermeldungen serverseitig, anstatt sie dem Benutzer anzuzeigen.[20, 5]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*** &lt;/del&gt;&amp;#039;&amp;#039;&amp;#039;Input Validation:&amp;#039;&amp;#039;&amp;#039; Validieren Sie alle Benutzereingaben serverseitig auf Typ, Format und erlaubte Werte, bevor Sie sie an die Datenbank übergeben. Dies ist eine wichtige zusätzliche Schutzschicht.[4, 5]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Input Validation:&amp;#039;&amp;#039;&amp;#039; Validieren Sie alle Benutzereingaben serverseitig auf Typ, Format und erlaubte Werte, bevor Sie sie an die Datenbank übergeben. Dies ist eine wichtige zusätzliche Schutzschicht.[4, 5]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*** &lt;/del&gt;&amp;#039;&amp;#039;&amp;#039;Prinzip der geringsten Rechte (Least Privilege):&amp;#039;&amp;#039;&amp;#039; Der Datenbankbenutzer, den Ihre PHP-Anwendung verwendet, sollte nur die minimal notwendigen Berechtigungen für seine Aufgaben besitzen.[5]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Prinzip der geringsten Rechte (Least Privilege):&amp;#039;&amp;#039;&amp;#039; Der Datenbankbenutzer, den Ihre PHP-Anwendung verwendet, sollte nur die minimal notwendigen Berechtigungen für seine Aufgaben besitzen.[5]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*** &lt;/del&gt;&amp;#039;&amp;#039;&amp;#039;Sichere Zugangsdaten:&amp;#039;&amp;#039;&amp;#039; Speichern Sie Datenbank-Credentials (Hostname, Benutzername, Passwort) niemals direkt im PHP-Code oder in Dateien innerhalb des Web-Roots.[20, 65] Verwenden Sie stattdessen Konfigurationsdateien außerhalb des öffentlich zugänglichen Bereichs oder Umgebungsvariablen.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Sichere Zugangsdaten:&amp;#039;&amp;#039;&amp;#039; Speichern Sie Datenbank-Credentials (Hostname, Benutzername, Passwort) niemals direkt im PHP-Code oder in Dateien innerhalb des Web-Roots.[20, 65] Verwenden Sie stattdessen Konfigurationsdateien außerhalb des öffentlich zugänglichen Bereichs oder Umgebungsvariablen.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*** &lt;/del&gt;&amp;#039;&amp;#039;&amp;#039;Code-Struktur:&amp;#039;&amp;#039;&amp;#039; Kapseln Sie Datenbankverbindungslogik und wiederkehrende Abfragen in Funktionen oder Klassen, um die Wartbarkeit und Wiederverwendbarkeit zu verbessern.[20]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Code-Struktur:&amp;#039;&amp;#039;&amp;#039; Kapseln Sie Datenbankverbindungslogik und wiederkehrende Abfragen in Funktionen oder Klassen, um die Wartbarkeit und Wiederverwendbarkeit zu verbessern.[20]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*** &lt;/del&gt;&amp;#039;&amp;#039;&amp;#039;Effizienz:&amp;#039;&amp;#039;&amp;#039; Laden Sie große Ergebnismengen nicht komplett in den Speicher (&amp;lt;code&amp;gt;fetchAll&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;fetch_all&amp;lt;/code&amp;gt;). Verwenden Sie stattdessen zeilenweise Verarbeitung (&amp;lt;code&amp;gt;while&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;fetch&amp;lt;/code&amp;gt;) oder Iteratoren (PDO mit PHP 8+).[37, 40] Nutzen Sie persistente Verbindungen nur nach sorgfältiger Abwägung der Vor- und Nachteile.[7, 27]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Effizienz:&amp;#039;&amp;#039;&amp;#039; Laden Sie große Ergebnismengen nicht komplett in den Speicher (&amp;lt;code&amp;gt;fetchAll&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;fetch_all&amp;lt;/code&amp;gt;). Verwenden Sie stattdessen zeilenweise Verarbeitung (&amp;lt;code&amp;gt;while&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;fetch&amp;lt;/code&amp;gt;) oder Iteratoren (PDO mit PHP 8+).[37, 40] Nutzen Sie persistente Verbindungen nur nach sorgfältiger Abwägung der Vor- und Nachteile.[7, 27]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*** &lt;/del&gt;&amp;#039;&amp;#039;&amp;#039;Defense-in-Depth:&amp;#039;&amp;#039;&amp;#039; Betrachten Sie Sicherheit als Gesamtkonzept. Die Kombination aus der richtigen API-Wahl, konsequenten Prepared Statements, Eingabevalidierung, minimalen Rechten, sicherer Fehlerbehandlung, sicherer Speicherung von Zugangsdaten und regelmäßigen Software-Updates bildet eine robuste Verteidigung.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Defense-in-Depth:&amp;#039;&amp;#039;&amp;#039; Betrachten Sie Sicherheit als Gesamtkonzept. Die Kombination aus der richtigen API-Wahl, konsequenten Prepared Statements, Eingabevalidierung, minimalen Rechten, sicherer Fehlerbehandlung, sicherer Speicherung von Zugangsdaten und regelmäßigen Software-Updates bildet eine robuste Verteidigung.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Völkl Anna</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.fernfh.ac.at/mediawiki/index.php?title=Datenbankintegration_(Webdevelopment)&amp;diff=6573&amp;oldid=prev</id>
		<title>Völkl Anna am 1. Mai 2025 um 12:49 Uhr</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.fernfh.ac.at/mediawiki/index.php?title=Datenbankintegration_(Webdevelopment)&amp;diff=6573&amp;oldid=prev"/>
		<updated>2025-05-01T12:49:26Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;de-AT&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version vom 1. Mai 2025, 12:49 Uhr&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l9&quot;&gt;Zeile 9:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 9:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Eine der populärsten Datenbanklösungen im Webentwicklungsbereich, insbesondere in Kombination mit PHP, ist MySQL. Als relationales Datenbankmanagementsystem (RDBMS) bietet MySQL eine strukturierte Methode zur Datenspeicherung in Tabellen, die miteinander in Beziehung stehen können. Es ist ein Kernbestandteil vieler Webserver-Setups wie LAMP (Linux, Apache, MySQL, PHP) oder LEMP (Linux, Nginx, MySQL, PHP).&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Eine der populärsten Datenbanklösungen im Webentwicklungsbereich, insbesondere in Kombination mit PHP, ist MySQL. Als relationales Datenbankmanagementsystem (RDBMS) bietet MySQL eine strukturierte Methode zur Datenspeicherung in Tabellen, die miteinander in Beziehung stehen können. Es ist ein Kernbestandteil vieler Webserver-Setups wie LAMP (Linux, Apache, MySQL, PHP) oder LEMP (Linux, Nginx, MySQL, PHP).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Um die Brücke zwischen der PHP-Anwendung und der MySQL-Datenbank zu schlagen, stellt PHP spezielle Erweiterungen (Extensions) bereit. Diese Erweiterungen fungieren als Schnittstelle oder API (Application Programming Interface), die es PHP-Skripten ermöglichen, eine Verbindung zur Datenbank herzustellen, SQL-Befehle &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(Structured Query Language Queries) &lt;/del&gt;zu senden und die von der Datenbank zurückgegebenen Ergebnisse zu empfangen und zu verarbeiten.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Um die Brücke zwischen der PHP-Anwendung und der MySQL-Datenbank zu schlagen, stellt PHP spezielle Erweiterungen (Extensions) bereit. Diese Erweiterungen fungieren als Schnittstelle oder API (Application Programming Interface), die es PHP-Skripten ermöglichen, eine Verbindung zur Datenbank herzustellen, SQL-Befehle zu senden und die von der Datenbank zurückgegebenen Ergebnisse zu empfangen und zu verarbeiten.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Dieses Kapitel führt &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Sie &lt;/del&gt;in die Grundlagen der Datenbankintegration mit PHP und MySQL ein. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Sie lernen &lt;/del&gt;die verschiedenen verfügbaren PHP-Erweiterungen &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;kennen&lt;/del&gt;, wobei der Schwerpunkt auf den modernen und sicheren Ansätzen liegt: PDO (PHP Data Objects) und MySQLi (MySQL Improved). &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Wir werden untersuchen&lt;/del&gt;, wie man Verbindungen aufbaut, grundlegende Datenbankoperationen – bekannt als CRUD (Create, Read, Update, Delete) – durchführt und wie man Daten sicher abfragt und manipuliert. Ein besonderes Augenmerk liegt dabei auf der Sicherheit, insbesondere auf der Vermeidung von SQL-Injection-Angriffen durch den Einsatz von Prepared Statements. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Schließlich betrachten wir &lt;/del&gt;nützliche PHP-Array-Funktionen zur Verarbeitung der abgerufenen Datenbankergebnisse.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Dieses Kapitel führt in die Grundlagen der Datenbankintegration mit PHP und MySQL ein. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Es enthält &lt;/ins&gt;die verschiedenen verfügbaren PHP-Erweiterungen, wobei der Schwerpunkt auf den modernen und sicheren Ansätzen liegt: PDO (PHP Data Objects) und MySQLi (MySQL Improved). &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Es wird gezeigt&lt;/ins&gt;, wie man Verbindungen aufbaut, grundlegende Datenbankoperationen – bekannt als CRUD (Create, Read, Update, Delete) – durchführt und wie man Daten sicher abfragt und manipuliert. Ein besonderes Augenmerk liegt dabei auf der Sicherheit, insbesondere auf der Vermeidung von SQL-Injection-Angriffen durch den Einsatz von Prepared Statements. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Zum Abschluss erfolgt ein Überblick über &lt;/ins&gt;nützliche PHP-Array-Funktionen zur Verarbeitung der abgerufenen Datenbankergebnisse.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Überblick über PHP-Datenbankerweiterungen ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Überblick über PHP-Datenbankerweiterungen ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Völkl Anna</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.fernfh.ac.at/mediawiki/index.php?title=Datenbankintegration_(Webdevelopment)&amp;diff=6572&amp;oldid=prev</id>
		<title>Völkl Anna am 1. Mai 2025 um 12:46 Uhr</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.fernfh.ac.at/mediawiki/index.php?title=Datenbankintegration_(Webdevelopment)&amp;diff=6572&amp;oldid=prev"/>
		<updated>2025-05-01T12:46:54Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://mediawiki.fernfh.ac.at/mediawiki/index.php?title=Datenbankintegration_(Webdevelopment)&amp;amp;diff=6572&amp;amp;oldid=6571&quot;&gt;Änderungen zeigen&lt;/a&gt;</summary>
		<author><name>Völkl Anna</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.fernfh.ac.at/mediawiki/index.php?title=Datenbankintegration_(Webdevelopment)&amp;diff=6571&amp;oldid=prev</id>
		<title>Völkl Anna am 1. Mai 2025 um 10:27 Uhr</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.fernfh.ac.at/mediawiki/index.php?title=Datenbankintegration_(Webdevelopment)&amp;diff=6571&amp;oldid=prev"/>
		<updated>2025-05-01T10:27:21Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://mediawiki.fernfh.ac.at/mediawiki/index.php?title=Datenbankintegration_(Webdevelopment)&amp;amp;diff=6571&amp;amp;oldid=6570&quot;&gt;Änderungen zeigen&lt;/a&gt;</summary>
		<author><name>Völkl Anna</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.fernfh.ac.at/mediawiki/index.php?title=Datenbankintegration_(Webdevelopment)&amp;diff=6570&amp;oldid=prev</id>
		<title>Völkl Anna am 1. Mai 2025 um 10:26 Uhr</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.fernfh.ac.at/mediawiki/index.php?title=Datenbankintegration_(Webdevelopment)&amp;diff=6570&amp;oldid=prev"/>
		<updated>2025-05-01T10:26:34Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://mediawiki.fernfh.ac.at/mediawiki/index.php?title=Datenbankintegration_(Webdevelopment)&amp;amp;diff=6570&amp;amp;oldid=6569&quot;&gt;Änderungen zeigen&lt;/a&gt;</summary>
		<author><name>Völkl Anna</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.fernfh.ac.at/mediawiki/index.php?title=Datenbankintegration_(Webdevelopment)&amp;diff=6569&amp;oldid=prev</id>
		<title>Völkl Anna: Die Seite wurde neu angelegt: „= Kapitel X: Datenbankintegration mit PHP und MySQL =  == (1) Einleitung: Warum Datenbanken in PHP-Webanwendungen? ==  = Moderne Webanwendungen sind selten statisch. Sie leben von dynamischen Inhalten, Benutzerinteraktionen und der Fähigkeit, Informationen über Sitzungen hinweg zu speichern und wieder abzurufen. Ob es sich um ein Content-Management-System (CMS), einen Online-Shop, ein soziales Netzwerk oder eine einfache Benutzerverwaltung handelt – d…“</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.fernfh.ac.at/mediawiki/index.php?title=Datenbankintegration_(Webdevelopment)&amp;diff=6569&amp;oldid=prev"/>
		<updated>2025-05-01T10:24:58Z</updated>

		<summary type="html">&lt;p&gt;Die Seite wurde neu angelegt: „= Kapitel X: Datenbankintegration mit PHP und MySQL =  == (1) Einleitung: Warum Datenbanken in PHP-Webanwendungen? ==  = Moderne Webanwendungen sind selten statisch. Sie leben von dynamischen Inhalten, Benutzerinteraktionen und der Fähigkeit, Informationen über Sitzungen hinweg zu speichern und wieder abzurufen. Ob es sich um ein Content-Management-System (CMS), einen Online-Shop, ein soziales Netzwerk oder eine einfache Benutzerverwaltung handelt – d…“&lt;/p&gt;
&lt;a href=&quot;https://mediawiki.fernfh.ac.at/mediawiki/index.php?title=Datenbankintegration_(Webdevelopment)&amp;amp;diff=6569&quot;&gt;Änderungen zeigen&lt;/a&gt;</summary>
		<author><name>Völkl Anna</name></author>
	</entry>
</feed>