Skip to content

Instantly share code, notes, and snippets.

@nested
Created September 25, 2016 17:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nested/02db9cfac22793e185e7803870a99acb to your computer and use it in GitHub Desktop.
Save nested/02db9cfac22793e185e7803870a99acb to your computer and use it in GitHub Desktop.
Doctrain with Codeigniter
public function UpdateTable()
{
$customerLoginDetails = $this->doctrine->em->getRepository('Entities\RtCustomerLoginDetails')->findOneBy(array('customerUserName' =>$this->session->userdata('username')));
$rtTrucks = $this->doctrine->em->getRepository('Entities\RtTrucks')->findBy(array('rtCustomer' => $customerLoginDetails->getRtCustomerId()));
$temp = array();
for ($i=0; $i < count($rtTrucks); $i++) {
$rtTruckStatus = $this->doctrine->em->getRepository('Entities\RtTruckStatus')->findOneBy(array('rtTrucksTruckRegistrationNumber' => $rtTrucks[$i]));
// array_push($temp, $rtTrucks[$i]->getTruckRegistrationNumber());
echo "<pre>";
print_r($rtTruckStatus->getRtTrucksTruckRegistrationNumber()->getTruckRegistrationNumber());
print_r($rtTruckStatus->getTruckActiveStatus());
echo "</pre>";
unset($rtTruckStatus);
}
return $temp;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment