Yii Framework Forum: Minor Typo In Definitive Guide - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Minor Typo In Definitive Guide Creating Your First Yii Application -- connecting to mySQL schema Rate Topic: -----

#1 User is offline   Greg_at_getnetez_dot_com 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 25-January 13

Posted 29 January 2013 - 01:33 PM

Hi all,

I'm a Yii newbie, but coming over from php-Nuke, Xoops, Joomla, and a brief flirtation with cakePHP.

I am loving the Yii Framework so far, and thanks for all the work.

It is a very small error, but it did cause me to do a double take and I thought a fix might help someone else just starting out.

In THE DEFINITIVE GUIDE TO YII -- Creating Your First Yii Application

While the schema in 'WebRoot/testdrive/protected/data/schema.mysql.sql' appears to be correct and works fine if you copy and paste from there; the schema described on the webpage is not correct :

CREATE TABLE tbl_user (
    id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
    username VARCHAR(128) NOT NULL,
    password VARCHAR(128) NOT NULL,
    email VARCHAR(128) NOT NULL
);


Should be

CREATE TABLE tbl_user (
    id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
    username VARCHAR(128) NOT NULL,
    password VARCHAR(128) NOT NULL,
    email VARCHAR(128) NOT NULL
);


Best, and regards

G
0

#2 User is offline   outrage 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 313
  • Joined: 10-November 09
  • Location:Blackpool, United Kingdom

Posted 30 January 2013 - 10:53 AM

Bad idea to use formatting options (color) within code block :)

CREATE TABLE tbl_user (
    id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
    username VARCHAR(128) NOT NULL,
    password VARCHAR(128) NOT NULL,
    email VARCHAR(128) NOT NULL
);

0

#3 User is offline   Greg_at_getnetez_dot_com 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 25-January 13

Posted 30 January 2013 - 11:27 AM

Yep... agreed... edited :-)
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users