--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/fhiiqm/test/stmt.php Wed Aug 31 14:22:19 2011 +0200
@@ -0,0 +1,47 @@
+<?php
+
+/**
+ * @author Bettina Schwarzer
+ * @copyright 2011
+ *
+ * TEST mit stmt-Klasse mysqli
+ */
+
+ include_once($_SERVER['DOCUMENT_ROOT'] ."/fhiiqm/inc/dbconnect.inc.php");
+ $dbc = new dbconnection();
+
+ echo "TEST mit stmt-Klasse mysqli<br />\n";
+
+ $stmt = $dbc -> stmtinit(); // jetzt wird das $stmt-Objekt erstellt
+
+ if (is_object($stmt))
+ {
+ $stmt -> prepare ("SELECT * FROM Vertrag WHERE contract_ID < ? ");
+ $stmt -> bind_param('i',$id);
+ $id=12;
+ $stmt -> execute();
+ $stmt -> store_result();
+ $stmt -> bind_result($c_ID, $cname, $cs, $cl, $vtyp_ID, $cbegin, $cend, $cmon, $cfile, $cbem);
+
+ if ($anz = $stmt -> num_rows)
+ {
+ echo "$anz Verträge gefunden<br />\n";
+ echo "<table>\n";
+ while ($stmt -> fetch())
+ {
+ echo "<tr><td>$c_ID</td>
+ <td>$cname</td>
+ <td>$cl</td>
+ <td>$vtyp_ID</td>
+ <td>$cbegin</td>
+ <td>$cend</td>
+ <td>$cmon</td>
+ <td>$cfile</td>
+ <td>$cbem</td></tr>\n";
+ }
+ echo "</table>\n";
+ }
+ $stmt -> close();
+ }
+
+?>
\ No newline at end of file