Custom Search

News World

Jun 6, 2011

PHP > DB Abstraction

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:

IT Conversations

Moneycontrol Latest News

Latest new pages on Computer Hope

Latest from Infoworld

Door Lock

Door Lock Import Top Door Lock from China Contact Quality Manufacturers Now