Forums

[SOLVED] Tables join problem

awgcas 29 Jan, 2012
Hi all,
I need to select all records from a table obtained with an Inner Join:


SELECT *
FROM table_1, table_2
WHERE table_1.id = table_2.id
AND table_2.email = 'some_email_address@mydomain'


As I read in other topics, I created 2 DBMRL in this way:
#1- DBMRL connected to table "table_1"
Model ID -> Table1
Load data & Enable associations -> Yes
Associated Models -> Table2
Join Rule -> table_1.id = table_2.id
Where -> table_2.email = 'some_email_address@mydomain'
Fields -> (list of fields I need)

#2- DBMRL connected to table "table_2"
Model Id -> Table2
Load Data & Enable associations -> No

And here is output using print_r2($form->data):

Array
(
    [option] => com_chronoforms
    [chronoform] => my_form
    [Itemid] => 
    [Table1] => 
)


What am I doing wrong????

Regards,
Alessandro

Joomla 1.7.3, CF 4.0 RC3.0
awgcas 31 Jan, 2012
Anyone here??
GreyHead 31 Jan, 2012
Hi awgcas,

Yes, I'm here - just have a long backlog of posts and don't know much about this topic so it's not a quick two minute answer :-(

Bob
awgcas 31 Jan, 2012
Hi GreyHead, no problem.

I understand that replies in a forum are on a full voluntary base!!

Just to know if meaning of my question was clear ...

Regards,
Alessandro
awgcas 06 Feb, 2012
No one can help me?
As I see in other posts, someone already had problem similar to mine ...

Thank you very much
Alessandro
This topic is locked and no more replies can be posted.