Oh....I forgot to mention...I am using Syfony 1.2.4 with Doctrine
plugin.
On Feb 14, 10:31 am, SeeVik <[email protected]> wrote:
> Hello all,
>
> I am trying to display data which results on performing an inner-join
> between two tables.
>
> Controller: action.class.php
> -----------------------------------------------------------
> public function executeShow()
> {
> $list = Doctrine::getTable( 'Table1' )->getJoinedTable();
>
> }
>
> Model Layer: ForumTable.class.php
> -----------------------------------------------------------
> public function getJoinedData()
> {
> $query = $this->createtQuery( 'a' )
> -> innerJoin( 'a.Table2 b' );
> return $query->execute();
>
> }
>
> View Layer: showSuccess.php
> -----------------------------------------------------------
> <?php foreach( $list as $i => $item ) : ?>
> <p> <?php echo $item->table1Field ?> </p>
> <p> <?php echo $item->Table2->table2Field ?> </p>
> <?php endforeach; ?>
>
> This displays a message "No description for object of class "Table2".
>
> So how do I display data from the field which is in Table2, the table
> I have performed join to.
>
> If I directly write like...
> <p> <?php echo $item->table2Field ?> </p>
>
> then it gives an error like...
> Unknown record property / related component "table2Field" on "Table1"
>
> Any ideas anyone?????????? Please help me.
>
> Thanks and Regards
> Vikram
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---