Login   Register  
PHP Classes
elePHPant
Icontem

File: data/databases_cubrid.sql

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Giovanni Ramos  >  PDO4You  >  data/databases_cubrid.sql  >  Download  
File: data/databases_cubrid.sql
Role: Auxiliary data
Content type: text/plain
Description: Add CUBRID databases
Class: PDO4You
Access SQL databases using the PDO extension
Author: By
Last change:
Date: 1 year ago
Size: 1,060 bytes
 

Contents

Class file image Download
---------------------------------
--CREATE DATABASE pdo4you;
---------------------------------
DROP TABLE IF EXISTS users;
CREATE TABLE users (
	id INT(11) NOT NULL AUTO_INCREMENT,
	firstname VARCHAR(20) NOT NULL,
	lastname VARCHAR(20) NOT NULL,
	mail VARCHAR(30) NULL,
	PRIMARY KEY (id)
);

INSERT INTO users (firstname, lastname, mail) VALUES 
('Giovanni', 'Ramos', 'pdo4you@gmail.com');


DROP TABLE IF EXISTS books;
CREATE TABLE books (
	id INT(11) NOT NULL AUTO_INCREMENT,
	title VARCHAR(100) NOT NULL,
	author VARCHAR(50) NOT NULL,
	description STRING NULL,
	PRIMARY KEY (id)
);

INSERT INTO books VALUES 
(1, 'Donec congue neque eget felis dapibus sollicitudin.', 'Giovanni Ramos', NULL);


---------------------------------
--CREATE DATABASE bookstore;
---------------------------------
DROP TABLE IF EXISTS books;
CREATE TABLE books (
	id INT(11) NOT NULL AUTO_INCREMENT,
	title VARCHAR(100) NOT NULL,
	author VARCHAR(50) NOT NULL,
	description STRING NULL,
	PRIMARY KEY (id)
);

INSERT INTO books VALUES 
(1, 'Cubrid', 'Evelyn Columba Sara', NULL);