- 必要なソフト
- autoconf2.61以降
- libtool
- TCL
- AWK(GAWK)
$ yum -y install tcl
等でインストールしてください。
- インストール
SQLite を実行するには、コマンドラインプログラムを開き、
sqlite3とタイプするだけ。
- 起動
$ sqlite3
SQLite version 3.6.22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite>
- 終了
sqlite> .exit
Web サーバーとの結合
- apache インストール
- ここ
をご参照ください。
- PHP から SQLite へ
- www のドキュメントを置くディレクトリ以下に、test.php を作成する。
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
| | <?php
$dbh = new PDO("sqlite::memory:", null, null);
$sth = $dbh->prepare("SELECT sqlite_version ()");
$sth->execute();
$result = $sth->fetchColumn();
$dbh = null;
?>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
<title>接続テスト</title>
</head>
<body>
<?php print $result; ?>
</body>
</html>
|