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


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-07-2008, 05:05 PM
Junior Member
 
Join Date: Feb 2008
Posts: 1
Default Error when where clause as array.

Greetings!

I am using 1.5PR. I have the following error being generated "Unknown column 'Array' in 'where clause'. The error is caused by:

$select = $sku_attribute_xref_factory->select()->where(array('sku_id = ?' => $sku_entry->id, 'attribute_id = ?'=> $attribute->id));

Which in Select.php, in protected method _where, generates a $condition of "(Array)." Am I doing it wrong or is this a bug in ZF?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-07-2008, 06:20 PM
Junior Member
 
Join Date: Feb 2008
Posts: 3
Default

i'm not sure, but i think you have to do it in 2 steps instead of an array.

Code:
$select = $sku_attribute_xref_factory->select()->where('sku_id = ?',$sku_entry->id)->where('attribute_id = ?',$attribute->id));
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-19-2008, 12:15 PM
greboguru's Avatar
Junior Member
 
Join Date: Feb 2008
Location: UK
Posts: 16
Default

Hi,

I've just come across the same problem. According to the online documentation you can pass an array into the where() Zend Framework: Documentation look at example Example 10.93.

I'm guessing this is a bug or are we doing something wrong?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-27-2008, 06:44 PM
xentek's Avatar
Senior Member
 
Join Date: Feb 2008
Posts: 112
Thumbs down

I'm also seeing this, and it seems like a bug to me. I haven't seen anything filed in the issue tracker, so I'm heading there now to do so.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-27-2008, 07:32 PM
xentek's Avatar
Senior Member
 
Join Date: Feb 2008
Posts: 112
Default

Quote:
Originally Posted by Salz` View Post
i'm not sure, but i think you have to do it in 2 steps instead of an array.

Code:
$select = $sku_attribute_xref_factory->select()->where('sku_id = ?',$sku_entry->id)->where('attribute_id = ?',$attribute->id));

Tried this, and it didn't work either. It doesn't error, but returns the metadata, and not the result set of the query.
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:19 AM.