21st Century Collection of Life Works.

CakePhp, SQLite database.

Once I used CakePhp for my website and this is on how I set up SQLite in CakePhp. It complements the guide at CakePhp and includes content of database.php, the SQL to create the Article table and the authentication table.

The database.php file for CakePhp to use SQLite is slightly different from the example given in CakePhp for MySQL.

// file app/Config/database.php
public $default = array(
'database'=> '../../db/notes.sqlite3', 'encoding'=>'utf8',

The syntax for authentication table is also different with SQLite.

CREATE TABLE `users` (
`username` varchar(30) NOT NULL PRIMARY KEY,
`email` varchar(150) NOT NULL,
`first_name` varchar(150),
`last_name` varchar(150),
`password` varchar(100) NOT NULL,
`role` varchar(30) NOT NULL,
`user_id` INTERGER,
`created` datetime NOT NULL,
`modified` datetime NOT NULL

The following SQL creates the articles table, which CakePhp calls 'post.' I use the term 'article' to differentiate it from the 'post' method in REST.

CREATE TABLE articles (
`title` VARCHAR(50),
`description` TEXT,
`body` TEXT,

Refer to http://book.cakephp.org/2.0/en/tutorials-and-examples/blog-auth-example/auth.html

To change default layout, including reference to cake.generic.css, modify the file


Updated: 2012-10-25 22:38:34

Insights of the past for the present

Computer Notes

CSS Color Names

CakePhp and SQLite

SQL Injection Scanner

Squish by Froglogic

Android Notes

Tools on Windows OS

Text to Speech Software

jEdit Plugins

Split File by jEdit Macro

Dark Eclipse theme

Eclipse Plugin Basics

FTP with Eclipse

Markdown with Eclipse


Knowledge of the Holy - A.W. Tozer

The Pursuit of God - A.W. Tozer

The Dwelling Place - A.W. Tozer

Plumber of Lisburn - A.W. Tozer

Spiritual Power Vows - A.W. Tozer

Root of the Righteous - A.W. Tozer

Essays - A.W. Tozer

Fourfold Gospel - A.B. Simpson

Gospel of Healing - A.B. Simpson

Life of A.B. Simpson - C&MA

Mark Gospel 1/4 - A MacLaren

Mark Gospel 2/4 - A MacLaren

Mark Gospel 3/4 - A MacLaren

Mark Gospel 4/4 - A MacLaren

Gospel of St. John - F.D. Maurice

To the Romans - R.V. Foster

To the Romans, vol I - C. Gore

To the Corinthians - J.S. Riggs

To the Philippians - R. Rainy

To the Galatians - Luther

To the Hebrews - H.C.G. Moule

To the Hebrews - T.C. Edwards

Wisdom of James - A.T. Robertson

Epistles of John 1/2 - W. Alexander

Epistles of John 2/2 - W. Alexander

Kingdom of Heaven - E. Burbidge

Deuteronomy - C.H. Mackintosh

Religion and Theology - J. Tulloch

The Being of God - St Anselm

The Existence of God - St Anselm

God Became Man - St Anselm

The Other Wise Man - H. Van Dyke

First Christmas Tree - H. Van Dyke

A Christmas Carol - C Dickens

Thoughts on the Universe

Computer Notes

About the Website

Color Theme:   Night     Day  

May your insights be worthy.