I have a many to many relationship between two tables. I need to select from one table, all of the associative data by specific filter on the 2nd table.
In ruby on rails i do that:
Code:
class User < ActiveRecord::Base
has_and_belong_to_many :entries, :as=>:items
end
user.items.find(:conditions=>["created_at=?", Date.today()])
in Zend-Framework i only success to make the realtionship so i can do now:
Code:
$user->findEntriesViaItems();
but without the filter i need (by created_at for example)
how can i do this?
(Sorry for my english, english isn't my main language)