Login   Register  
PHP Classes

File: example1.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Josť Augusto Ferreira Franco  >  SQLite DB Handler  >  example1.php  >  Download  
File: example1.php
Role: Example script
Content type: text/plain
Description: This short example shows the process required to build a table with class db from package SQLITE DB HANDLER
Class: SQLite DB Handler
Create and manage SQLite database files
Author: By
Last change:
Date: 9 years ago
Size: 1,149 bytes


Class file image Download

# Database and table process with class db from package "SQLITE DB HANDLER"
# Author : Guto Ferreira
# Web :    http://onidesk.sytes.net

//{{{{ instanciates the class
$db = new db;

// {{{ makes the  connection with seted database file

//{{{  informing the array that will pass the values to generate table name and table rows and data type
$values = array("TABLE" => "novidades",   // on this line just alter the table name (on this example the table name is novidades)
"id"     => "INTEGER PRIMARY KEY",
"titulo" => "VARCHAR(40)",
"artigo" => "TEXT(100)",
"autor"  => "TEXT(16)",
"data"   => "NUMERIC(12)");
/// passing the values as a parameter to the method "Create_Table"


//{{{ Close the connection with database