Jump to content
Larry Ullman's Book Forums

Foreign Key Constraints

Recommended Posts

Morning Larry et al,


Regarding Foreign Key constraints in the command


CONSTRAINT fk_page_user
FOREIGN KEY (user_id)
REFERENCES yii_cms.user (id)


ON DELETE - does that mean you're deleting the `user_id` of the page table (the table in which the sql command was written) or the `id` of the user table it references, or something else?


Thank you



Link to comment
Share on other sites

  • 2 weeks later...

Good things come to those who wait. ;)


Relax, everyone. Quality will be affected if he rushes this book out. I'm sure everyone will gain on him not rushing this.


I was just winding him up, Ive been starting to mess around with Yii a little bit. And also reading the Alexander Makarov cookbook which is available. By the way Antonio there is three ways you can build queries in Yii, you can use Active Record which is the slowest, you can also use Query Builder or if you want the fatest you can use the Standard SQL(DAO) method. So with queries and Yii there is nothing to worry about, i remember you wrote about how inefficient code ignitor quiries were.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...