diff _xampp/contrib/interbase.php @ 0:b12c99b7c3f0

commit for previous development
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Mon, 19 Jan 2015 17:13:49 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/_xampp/contrib/interbase.php	Mon Jan 19 17:13:49 2015 +0100
@@ -0,0 +1,36 @@
+<html>
+<head>
+<title>PHP und InterBase</title>
+</head>
+<body>
+<h1>PHP und InterBase/Firebird</h1>
+<table border="1">
+<tr>
+    <th>Interpret</th>
+    <th>Titel</th>
+    <th>Jahr</th>
+</tr>
+<?php
+    $db = ibase_pconnect("/opt/lampp/var/firebird/cdcol.gdb", "oswald", "geheim");
+
+    $query = "SELECT * FROM cds";
+    $result = ibase_query($query);
+    if ($result) {
+        while ($row = ibase_fetch_assoc  ($result))
+        {
+            echo "<tr>";
+            echo "<td>".$row['INTERPRET']."</td>";
+            echo "<td>".$row['TITEL']."</td>";
+            echo "<td>".$row['JAHR']."</td>";
+            echo "</tr>";
+        }
+    }
+    else
+    {
+        echo ibase_errmsg();
+    }
+
+?>
+</table>
+</body>
+</html>