Welcome Guest, Not a member yet? Register   Sign In
when using where and get with datamapper, it only returns one record even though multiple meet the condition
#1

[eluser]johnmerlino[/eluser]
Hey all,

When I do this:

Code:
$category->where('controller',$this->uri->segment(1))->get();

I have multiple records in my categories table where the field called controller has a value that is equal to what's in the current uri segment. So if segment 1 of uri is 'home', and I have multiple records in categories table with a controller value of 'home', I would expect all those records to be part of the returned value from the get call. However, it only returns the first record it finds that matches the where condition.

I looked over this document carefully:

http://stensi.com/datamapper/pages/get.html

But I am stumped how I can return multiple records that meet the where condition when using get.

Thanks for response.


Messages In This Thread
when using where and get with datamapper, it only returns one record even though multiple meet the condition - by El Forum - 04-08-2011, 09:23 PM



Theme © iAndrew 2016 - Forum software by © MyBB