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


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-14-2008, 08:30 AM
Member
 
Join Date: Nov 2007
Posts: 33
Question Cannot use array_slice with fetchAll?

Hi, I receiving the following warning when I try to take an array_slice of the returned array from fetchAll:

Warning: array_slice() [function.array-slice]: The first argument should be an array

If anyone has any ideas as to what's going on, please post a note.

Thanks in advance,

-Conrad
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 05-16-2008, 12:56 AM
Junior Member
 
Join Date: May 2008
Posts: 10
Default

fetchAll only returns an array if it is invoked on an instance of Zend_Db_Adapter.

If you're using an instance of Zend_Db_Table, (ie, a model) fetchAll actually returns an object of the type Zend_Db_Table_Rowset. This can, however, be turned into an array by executing its toArray() method.
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 09:13 PM.