Small. Fast. Reliable.
Choose any three.

This information is obsolete. You are looking at the CVSTrac source management system display for SQLite that was replaced by Fossil on 2009-08-11. The information shown here has not been updated since that cut-over. These pages are retained for historical reference only.

  • CREATE A NEW TABLE IN A .db FILE:

$dbfile = 'foo.db'; "
" if (!$db = sqlite_open($dbfile, 0666, $err) ) { die($err); } "
" $create='CREATE TABLE CONTACTS( "
" name VARCHAR(32), "
" precall VARCHAR(5), "
" number VARCHAR(30) "
" )'; "
" $sql = sqlite_query($db,$create); "
"

sqlite_query($db, " INSERT INTO CONTACTS "
" VALUES ('PETER','089','4711')"); "
" sqlite_query($db, " INSERT INTO CONTACTS "
" VALUES ('ANNA','040','1122')"); "
" sqlite_query($db, " INSERT INTO CONTACTS "
" VALUES ('Maxi','089','9876')"); "
" sqlite_close($db); "
"