Minor Typo In Definitive Guide

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

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

);

Yep… agreed… edited :slight_smile: