Advertisement
Shiny_

Untitled

Aug 2nd, 2013
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.70 KB | None | 0 0
  1. <?php
  2.     $database = sqlite_open('base');
  3.     $query = sqlite_query($db, "CREATE TABLE IF NOT EXISTS 'Settings'
  4.     (
  5.         'ID' INTEGER PRIMARY KEY,
  6.         'INDEX' VARCHAR(32),
  7.         'TITLE' VARCHAR(32)
  8.         'VERSION' FLOAT
  9.     )");
  10.     $query = sqlite_query($db, "INSERT INTO 'Settings' VALUES
  11.     (
  12.         NULL,
  13.         'Infinity-Gaming.net',
  14.         'Indeks',
  15.         '1.0.0.0'
  16.     )");
  17.     $query = sqlite_query($db, "SELECT 'INDEX', 'TITLE', 'VERSION' FROM 'Settings' WHERE 'ID' = '0'");
  18.    
  19.     while($data = sqlite_fetch_array($query, SQLITE_ASSOC))
  20.     {
  21.         echo 'Indeks: "
  22.                 .$data["INDEX"].
  23.             "<br/>Tytuł: "
  24.                 .$data["TITLE"].
  25.             "<br/>Wersja: "
  26.                 .$data["VERSION"]"
  27.             ';
  28.     }
  29.     echo "Znaleziono " .sqlite_num_rows($query). "wpisów.";
  30. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement