Login   Register  
PHP Classes
elePHPant
Icontem

File: database/tbl_article.sql

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Gjero Krsteski  >  Building an Identity Map in PHP  >  database/tbl_article.sql  >  Download  
File: database/tbl_article.sql
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Building an Identity Map in PHP
Retrieve objects avoiding multiple instances
Author: By
Last change:
Date: 2 years ago
Size: 343 bytes
 

Contents

Class file image Download
CREATE TABLE IF NOT EXISTS tbl_article (

  id      INT NOT NULL AUTO_INCREMENT,
  title   VARCHAR(30) NOT NULL,
  content VARCHAR(255) NOT NULL,
  userId  INT NOT NULL,

  PRIMARY KEY (id),

  INDEX (userId),

  FOREIGN KEY (userId)

  REFERENCES tbl_user (id)
    ON DELETE CASCADE
    ON UPDATE CASCADE

) TYPE=INNODB DEFAULT CHARSET=utf8;