Top > SQLite > インストール


SQLite のインストール

必要なソフト
  • autoconf2.61以降
  • libtool
  • TCL
  • AWK(GAWK)
    $ yum -y install tcl
    等でインストールしてください。
インストール

SQLite の起動と終了

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>

リロード   凍結解除 コピー 名前変更   ホーム 一覧 検索 最終更新 バックアップ リンク元   ヘルプ   最終更新のRSS
Last-modified: Mon, 03 Jun 2019 14:37:49 UTC (2116d)