Hi,
I have a custon display connection with 2 models.
The relation is "hasmay"...the first model is connected to the table of contact_details, and the second model is connected to the table of content.
In the first model, I use the conditon to filter the user and the language :
In the second model, i use this condiction to filter user articles:
I want to show the contact details from the user that is logged and the articles that he published.
In the output I can see the user details, but can't see his articles...
I turn on the debug, and the query is correct... just can't see the articles.
I used the same sintax to reference the second model {model.field}, but something is missing!!
Any suggestions?
				
				
				
			I have a custon display connection with 2 models.
The relation is "hasmay"...the first model is connected to the table of contact_details, and the second model is connected to the table of content.
In the first model, I use the conditon to filter the user and the language :
<?php
$user = JFactory::getUser();
return array('pd.user_id' => $user->id, 'pd.language' => 'pt-PT');
?>In the second model, i use this condiction to filter user articles:
<?php
$user = JFactory::getUser();
return array('art.created_by' => $user->id, 'art.language' => 'pt-PT');
?>I want to show the contact details from the user that is logged and the articles that he published.
In the output I can see the user details, but can't see his articles...
I turn on the debug, and the query is correct... just can't see the articles.
I used the same sintax to reference the second model {model.field}, but something is missing!!
Any suggestions?
					Hi nbento,
I don't understand why, if the query is correct, you don't see any results. Have you tried copying and pasting the query into PHPMyAdmin to see if you get results there?
Bob
				
				
				
			I don't understand why, if the query is correct, you don't see any results. Have you tried copying and pasting the query into PHPMyAdmin to see if you get results there?
Bob
					Hi GreyHead,
Yes, I did that... I put the query in PhpMyAdmin and get the results that I want.
I also change the display to "table" and it doesn't show the data from the second model to!!
It must be something in the relation with the to models.
Put what I have in the models configuration attached to this comment...any clue?
Thanks,
Nuno
				
				
				
			Yes, I did that... I put the query in PhpMyAdmin and get the results that I want.
I also change the display to "table" and it doesn't show the data from the second model to!!
It must be something in the relation with the to models.
Put what I have in the models configuration attached to this comment...any clue?
Thanks,
Nuno
This topic is locked and no more replies can be posted.
		
	
 
  