Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-13-2008, 03:01 PM
Junior Member
 
Join Date: Mar 2008
Posts: 2
Default Too many columns for the primary key?

I have a model called Article. The primary key is 'id'

When I do this in my controller:
$article = new Article;
$row = $article->find(37, 'id');

If get this error:
Fatal error: Uncaught exception 'Zend_Db_Table_Exception' with message 'Too many columns for the primary key'


Does anyone know what the problem is with this? Thanks for any help guys.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-13-2008, 06:56 PM
xentek's Avatar
Senior Member
 
Join Date: Feb 2008
Posts: 112
Default

I thought find() only required the id# ... it already knows your primay key...

take out the 'id' part, and see what happens.
__________________
- xentek
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 03:18 AM.