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 User Functions – Wishlist

To demonstrate access control, we will create a new function for users of our site to show them our comic book wishlist. When a special occasion is coming up, your friends and family will be able to log in and view your wishlist to get gift ideas.

Engage Thrusters

  1. Start by adding a new table to the database as follows:

     
     CREATE TABLE 'wish' ( 'id' int(10) unsigned NOT NULL AUTO_INCREMENT, 'title' varchar(256) NOT NULL, 'issue_number' varchar(10) DEFAULT NULL, 'type_id' int(10) unsigned DEFAULT NULL, 'publication_date' date DEFAULT NULL, 'store_link' varchar(255) DEFAULT NULL, 'notes' text DEFAULT NULL, 'got_it' int(10) unsigned DEFAULT NULL, PRIMARY KEY ('id'), KEY 'type_id' ('type_id'), KEY 'got_it' ('got_it'), CONSTRAINT ...

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