Welcome Guest, Not a member yet? Register   Sign In
List to Array[][]

Hi !
I'm using CodeIgniter with Doctrine as ORM. In parts of my apps, I need to request 3 tables (A, B & C) where C contains keys of A & B. Looks as C as an N-N associated tables containing infos on the association.

The presentation should be something like that :
B1 | B2 | B3
A1| C1 | C2 | C3

In order to avoid to many request, I would like to retreive all data in one request :
A1 B1 C1
A1 B2 C2
A1 B3 C3
A2 B1 C11

And then translate the result in a array :
$arr[<A>][<B>] = <C>

I'm wondering if there some helper or others methods to improve the mechanism ...

Theme © iAndrew 2016 - Forum software by © MyBB