topical media & game development
server-php-sqlite-count.php / php
<?php
// create a SQLite3 database file with PDO and return a database handle (Object Oriented)
try{
//echo 'sqlite:'.
//dbHandle = new PDO('sqlite:'.
dbHandle = new PDO('sqlite:server-php-sqlite-count.db');
}catch( PDOException exception->getMessage());
}
// create page view database table
dbHandle->exec(sqlInsertVisit = 'INSERT INTO pageView (page, access) VALUES (:page, :access)';
dbHandle->prepare(stmt->bindParam(':page', stmt->bindParam(':access', time(), PDO::PARAM_INT);
pageVisit = _SERVER['PHP_SELF']);
pageVisit.'';
dbHandle->query(pageView = pageVisit.' page has been viewed '.
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.