Results 1 to 5 of 5
Thread: SQLite 3 PHP
Hybrid View
-
14th October 2008 22:15 #1
SQLite 3 PHP
SQLite 3 PHP 5.2.4 ... SQLite 2 , 3 . ??
We are drowning in information, but starving for knowledge and time!
-
15th October 2008 03:10 #2
" SQLite 3 PHP 5.2.4". ? ? , ? , ? , ? .., .... , .
Internet - it doesn't make you stupid, it just makes your stupidity more accessible to others
-
15th October 2008 11:25 #3
XAPP .
. SQLite3.dll php.ini php5.ini. phpinfo() , "could not find driver"
:
phpinfoCode:<?php // create a SQLite3 database file with PDO and return a database handle (Object Oriented) try{ $dbHandle = new PDO('sqlite:'.$_SERVER['DOCUMENT_ROOT'].'/../pdoTutorial.sqlite3'); }catch( PDOException $exception ){ die($exception->getMessage()); } // create page view database table $sqlCreateTable = 'CREATE TABLE pageView(id INTEGER PRIMARY KEY AUTOINCREMENT, page CHAR(256), access INTEGER(10))'; $dbHandle->exec($sqlCreateTable); // remove or 'comment out' this line after first run // insert page visit in database with a prepared statement $sqlInsertVisit = 'INSERT INTO pageView (page, access) VALUES (:page, :access)'; $stmt = $dbHandle->prepare($sqlInsertVisit); $stmt->bindParam(':page', $_SERVER['PHP_SELF'], PDO::PARAM_STR); $stmt->bindParam(':access', time(), PDO::PARAM_INT); $stmt->execute(); // get page views from database $pageVisit = $dbHandle->quote($_SERVER['PHP_SELF']); $sqlGetView = 'SELECT count(page) AS view FROM pageView WHERE page = '.$pageVisit.''; $result = $dbHandle->query($sqlGetView); $pageView = $result->fetch(); // store result in array // print page views echo 'This page has been viewed '.$pageView['view'].' times.'; ?>
PDO drivers mssql, mysql, sqlite2
SQLite support enabled
PECL Module version 2.0-dev $Id: sqlite.c,v 1.166.2.13.2.10 2007/12/31 07:20:11 sebastian Exp $
SQLite Library 2.8.17
SQLite Encoding iso8859We are drowning in information, but starving for knowledge and time!
-
15th October 2008 17:02 #4
-
16th October 2008 02:52 #5
, Skydrive, "could not find driver"
We are drowning in information, but starving for knowledge and time!




Reply With Quote
Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in