close
Warning:
Can't synchronize with repository "(default)" (Unsupported version control system "svn": /usr/lib/python2.7/dist-packages/libsvn/_delta.so: failed to map segment from shared object: Cannot allocate memory). Look in the Trac log for more information.
- Timestamp:
-
May 15, 2010, 9:05:20 PM (15 years ago)
- Author:
-
jazz
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v18
|
v19
|
|
161 | 161 | }}} |
162 | 162 | * [http://tw.php.net/sqlite PHP: SQLite - Manual] - PHP 存取 SQLite 的原文手冊 |
163 | | * [http://support.oss.org.tw/wiki/index.php/Php_sqlite PHP-SQLite - 資策會技術支援資料庫] |
| 163 | * [http://wiki.oss.org.tw/index.php/Php_sqlite PHP-SQLite - 資策會技術支援資料庫] |
| 164 | {{{ |
| 165 | <?PHP |
| 166 | |
| 167 | $db = sqlite_open('ex3.db', 0666, $sqliteerror); |
| 168 | $query = sqlite_query($db, "SELECT * FROM tbl"); |
| 169 | var_dump($query); |
| 170 | sqlite_close($db); |
| 171 | ?> |
| 172 | }}} |
| 173 | {{{ |
| 174 | <?PHP |
| 175 | $db = sqlite_open('ex3.db', 0666, $sqliteerror); |
| 176 | $query = sqlite_array_query($db, "SELECT * FROM tbl", SQLITE_ASSOC); |
| 177 | //Object-oriented style |
| 178 | //$dbhandle = new SQLiteDatabase('ex3.db'); |
| 179 | //$query = $dbhandle->arrayQuery('SELECT * FROM tbl', SQLITE_ASSOC); |
| 180 | |
| 181 | foreach ($query as $entry) { |
| 182 | echo Title: ' . $entry['title'] . ' Length: ' . $entry['length']; |
| 183 | echo "<br>"; |
| 184 | } |
| 185 | ?> |
| 186 | }}} |
164 | 187 | |
165 | 188 | == OpenPBS / Torque == |