O'Reilly logo

Yii Rapid Application Development Hotshot by James R. Hamilton III, Lauren J. O'Meara

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding Issue Number to the Book Object

We will add a field for issue number to our book object by adding it as a column for the already existing book table in our cbdb database. Since we have already created our model, view, and controller with Gii, we will need to manually modify these files to use the new field.

Engage Thrusters

  1. In the Services tab, open the connection to cbdb and open the list of tables:
    Engage Thrusters
  2. Right-click on the book table and go to Add Column. Name the field issue_number, select VARCHAR for the type and 10 for the size, and click on OK as shown in the following screenshot:
  3. Now let's make the model aware of our change. Open ch2 |

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required