Created
November 5, 2010 13:09
-
-
Save hSammir/664112 to your computer and use it in GitHub Desktop.
Koneksi PHP, Sqlite3 dgn Pendekatan OOP.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Sumber: http://id2.php.net/manual/en/sqlite3.open.php | |
| * Sesuaikan file database sqlite3 (dlm contoh: sqlite/data) | |
| */ | |
| class MyDB extends SQLite3 | |
| { | |
| function __construct() | |
| { | |
| $this->open('sqlite/data'); | |
| } | |
| } | |
| $db = new MyDB(); | |
| $result = $db->query('SELECT * from daftar'); | |
| var_dump($result->fetchArray()); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment