First of all, thanks for the great library.
And yes, I already mad some recommendations to other devs !
But I'm having a small issue / question concerning Many2Many relations...
(let's take the example of persons speaking 1 or more language(s), and a language is spoken by 1 or more persons)
So, I'm having 3 tables:
(let's keep it easy...)
Table 1: persons
id name
1 Joe
2 Sara
3 Paul
Table 2: languages
id name
1 English
2 Dutch
3 French
Table 3: persons_languages
id person_id language_id
1 1 1
2 1 2
3 2 1
4 3 1
5 3 2
6 3 3
(as you can see.... Paul is speaking 3 languages :)
Building the 3 controllers, and the 3 models is no problem at all (see attach)
But how would you recommend to build the:
'languages per person'
and
'persons per language'
functions ?? (using your library, of course)
(Is there a possibility to :
give a "where clause" to the JoinArray function in Mdl_persons_languages
or
Should I use the "whereClauseArray" function in the model Mdl_persons_languages ?
Thanks in advance for your help, Paul !!
(and as mentioned before, NO problem at all to share my final code & database with you !!!)
PS.: I wanted to add a ZIP file to this msg, but that doesn't seem to be possible... Have sent it to you via mail ....
Hi Paul,
First of all, thanks for the great library. And yes, I already mad some recommendations to other devs !
But I'm having a small issue / question concerning Many2Many relations... (let's take the example of persons speaking 1 or more language(s), and a language is spoken by 1 or more persons)
So, I'm having 3 tables: (let's keep it easy...)
Table 1: persons id name 1 Joe 2 Sara 3 Paul
Table 2: languages id name 1 English 2 Dutch 3 French
Table 3: persons_languages id person_id language_id 1 1 1 2 1 2 3 2 1 4 3 1 5 3 2 6 3 3 (as you can see.... Paul is speaking 3 languages :)
Building the 3 controllers, and the 3 models is no problem at all (see attach)
But how would you recommend to build the: 'languages per person' and 'persons per language'
functions ?? (using your library, of course)
(Is there a possibility to :
Thanks in advance for your help, Paul !! (and as mentioned before, NO problem at all to share my final code & database with you !!!)
PS.: I wanted to add a ZIP file to this msg, but that doesn't seem to be possible... Have sent it to you via mail ....
grtz,
Johnny