4 Replies to “Learning Phalcon PHP – My first book”

  1. I purchased your book from Packt Publishing four day’s ago. I know it’s your first book and its the first revision, but there are many errors in the code. I have managed to fix most of these (actually helped the learning experience!), but as an example of some that I am struggling with is this:
    Bottom of page 95
    ALTER TABLE `user_profile`
    ADD CONSTRAINT `user_profile_ibfk_1` FOREIGN KEY (`user_profile_user_

    Then top of page 96:
    ALTER TABLE `user`
    ADD CONSTRAINT `user_ibfk_2` FOREIGN KEY (`user_profile_id`) REFERENCES
    `user_profile` (`id`) ON UPDATE NO ACTION,
    ADD CONSTRAINT `user_ibfk_1` FOREIGN KEY (`user_group_id`) REFERENCES
    `user_group` (`id`) ON UPDATE NO ACTION;

    Which create THREE constraints between the tables, you then produce a diagram showing only TWO constraints.
    Further: a field in the second constraint ‘user_profile_id’ did not exist in the user table.

    At present I do not know if this will stop my progress.

    Appreciate a reply
    Thanks Jonathan

    1. PhalconUserPlugin is … a plugin. It assumes that you already know how Phalcon works. The user management from the book is more like an idea about how you can achieve this. You can use what fits you the best.

  2. Hey, congrats on finishing the book and getting it out. That’s quite an achievement 🙂

    I’m also trying to use PhalconUserPlugin, but I’m having a hard time figuring out what goes where, and the examples in your git repo doesn’t seem to be updated to work with Phalcon 2 or assumes there is a BaseController class which Phalcon doesn’t introduce and isn’t mentioned anywhere in the code.

    Is there by any chance a site that uses PhalconUserPlugin which one can get the code for? I tend to learn very well by looking at examples, and it would be most useful.

    Thanks for an awesome contribution 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *