Welcome Guest, Not a member yet? Register   Sign In
How to call function in viewer
#1

[eluser]MaxEisley[/eluser]
Hello everyone,

i have one for me insoluble problem.

In viewer i have showing my orders and for every order i want to show declaration of car, some typ, number etc..:
Code:
foreach ($orders as $order) {
      $from = date_create($order->Datum);
      $from = date_format($from, "j.n.Y");
      $until = date_create($order->DatumVraceni);
      $until = date_format($until, "j.n.Y");
      $car = $this->data_model->gettargetcar($order->zakazkaID);
      echo '<tr> <td>'.$order->Jmeno.' '.$order->Prijmeni.' - '.$order->Email.'</td> <td>'.$from.'</td> <td>'.$until.'</td> <td>'.$car->Typ.' s '.$car->SPZ.'</td> </tr>';
    }

But in code i want to call function gettargetcar with parameter zakazkaID(english orderID) and then show Typ and SPZ.

I cannot do it in controller because in Controller i don't get zakazkaID, so it must be in viewer, but this code doesnt work.

It writes this: Trying to get property of non-object

Its project for my homework and i need fast help, thanks very much.


Messages In This Thread
How to call function in viewer - by El Forum - 04-28-2011, 01:11 PM
How to call function in viewer - by El Forum - 04-29-2011, 01:33 AM
How to call function in viewer - by El Forum - 04-29-2011, 01:56 AM
How to call function in viewer - by El Forum - 04-29-2011, 02:30 AM
How to call function in viewer - by El Forum - 04-29-2011, 03:45 AM
How to call function in viewer - by El Forum - 04-29-2011, 06:51 AM
How to call function in viewer - by El Forum - 04-29-2011, 07:40 AM
How to call function in viewer - by El Forum - 04-29-2011, 08:50 AM
How to call function in viewer - by El Forum - 04-29-2011, 11:05 AM
How to call function in viewer - by El Forum - 04-30-2011, 01:20 AM
How to call function in viewer - by El Forum - 04-30-2011, 04:52 PM
How to call function in viewer - by El Forum - 05-02-2011, 07:46 PM
How to call function in viewer - by El Forum - 05-03-2011, 12:19 PM



Theme © iAndrew 2016 - Forum software by © MyBB