1 #########################################
2 SAMPLE FOR DB Abtraction
3 #########################################
4
5 < ? php
6 require_once 'MyDB.php';
7 $db = MyDB::connect('odbc://user:pw@host/mydb');
8 $stmt = $mydb->prepare('SELECT * FROM remark');
9 $result = $mydb->execute($stmt);
10 while($row = $mydb->fetchrow($result)) {
11 while($row as $field => $value ) {
12 echo "$field: $value
\n";
13 }
14 }
15 $db->disconnect();
16 ? >
No comments:
Post a Comment