Thanks i got my answer.
:)

On Aug 22, 5:15 pm, Grant Cox <[EMAIL PROTECTED]> wrote:
> Don't put a $ in the set call.
>
> $this->set('transactions', $this->Transaction->findAll(array('user_id'
> => $userId)));
>
> On Aug 22, 9:01 pm,nirmal<[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I am getting error on web page:
>
> > Notice: Undefined variable: transactions in /home/codewalla/work/
> > decktrade/src/webapp/www/app/views/users/transaction.thtml on line 28
>
> > Warning: Invalid argument supplied for foreach() in /home/codewalla/
> > work/decktrade/src/webapp/www/app/views/users/transaction.thtml on
> > line 28
>
> > Code in controler:
> >         function transaction() {
> >                 $userId = $this->_loadUserId();
> >                 ini_set("max_execution_time",60);
> >                 ini_set( 'memory_limit', '64M' );
> >                 $this->set('$transactions', 
> > $this->Transaction->findAll(array
> > ('user_id' => $userId)));
> >         }
>
> > Code in thtml:
> > <?php foreach ($transactions as $transaction): ?>
> > <tr>
> >         <td style="text-align: left; padding-left: 15px;"><strong><a
> > href=""><?php echo $transaction['Transaction']['id']; ?></a></strong></
> > td>
> >         <td><?php echo $transaction['Transaction']['date']; ?></td>
> >         <td style="text-align: right; padding-right: 10px;">$ <?php echo
> > getEarnings($transaction['Transaction']['amount']) ?></td>
> >         <td><?php echo 
> > number_format($transaction['Transaction']['status']); ?></td>
>
> > </tr>
>
> > Please help me.
>
> > --
> >Nirmal


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to