Jump to content
Larry Ullman's Book Forums

Search the Community

Showing results for tags 'attributelabels'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Single Editions
    • Modern Javascript: Develop and Design
    • The Yii Book
    • Effortless Flex 4 Development
    • Building a Web Site with Ajax: Visual QuickProject
    • Ruby: Visual QuickStart Guide
    • C++ Programming: Visual QuickStart Guide
    • C Programming: Visual QuickStart Guide
    • Adobe AIR: Visual QuickPro Guide
  • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (5th Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (4th Edition)
    • PHP 6 and MySQL 5 for Dynamic Web Sites: Visual QuickPro Guide (3rd Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (2nd Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (1st Edition)
  • PHP for the Web: Visual QuickStart Guide
    • PHP for the Web: Visual QuickStart Guide (5th Edition)
    • PHP for the Web: Visual QuickStart Guide (4th Edition)
    • PHP for the Web: Visual QuickStart Guide (3rd Edition)
    • PHP for the World Wide Web: Visual QuickStart Guide (2nd Edition)
    • PHP for the World Wide Web: Visual QuickStart Guide (1st Edition)
  • Effortless E-commerce with PHP and MySQL
    • Effortless E-Commerce with PHP and MySQL (2nd Edition)
    • Effortless E-Commerce with PHP and MySQL
  • PHP Advanced: Visual QuickPro Guide
    • PHP Advanced and Object-Oriented Programming: Visual QuickPro Guide (3rd Edition)
    • PHP 5 Advanced: Visual QuickPro Guide (2nd Edition)
    • PHP Advanced: Visual QuickPro Guide
  • MySQL: Visual QuickStart Guide
    • MySQL: Visual QuickStart Guide (2nd Edition)
    • MySQL: Visual QuickStart Guide (1st Edition)
  • Other
    • Announcements
    • Newsletter, Blog, and Other Topics
    • Forum Issues
    • Social

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 1 result

  1. Here are some questions that crossed my mind while reading Chapter 5 (Version 0.5) Page 86 The book states, "If you also set a requiredValue attribute for the item in question, your error message can indicate what the required value is via {value}." My question: Larry, could you please provide an example showing how the value of {value} would be set? Page 91 Please show the code I would need to "create user-related scenarios for changing passwords". Also, in which circumstances would I set a scenario on an existing instance, as opposed to creating a new user? Page 93 Why is it necessary to write "filter" twice in this code: 'filter', 'filter'=>'strip_tags' ? Page 94 Wouldn't declaring search terms as safe be a security risk? Here is the code from the book: array('id, user_id, live, title, content, date_updated, date_published', 'safe', 'on'=>'search'), Page 95 Why would we need to compare passwords if the user is only just registering? How would he/she already know a password? Quoting from the book: // Password must match the comparison: array('pass', 'compare', 'compareAttribute'=>'passCompare', 'on'=>'register'), Page 95 I have read a credible article on the Internet stating that ENUM fields are "evil". If I prefer to avoid using an ENUM field, and instead use a separate table of "types" which lists these values 'public','author','admin' etc, and the table has a one to many relationship with User.type, how would I obtain the values from the types table for use in this rule? Here is the code from the book: array('type', 'in', 'range'=>array('public','author','admin')), Page 97 The book states: "Also, when you have a model that’s not based upon a database, you’ll need to add the attribute names and values to the attributeLabels() method yourself." How do these attribute labels end up being incorporated into various HTML forms? Page 101 Quoting from the book: $this->user_id = Yii::app()->user->id; My question: I understand the relationship, but aren't there many user.id values to choose from? How does the framework know which id is the correct one? Page 102 Here's a syntax question: 'date_entered' in the first example becomes $this->created in the second example. How can these refer to the same table field? Page 102 Can you please provide an example how I could "return false in the event handler method"? Quoting from the book: "As a final note on this concept, if the event that’s about to take place shouldn’t occur–for example, the model should not be saved for some reason, just return false in the event handler method." Thanks.
×
×
  • Create New...