×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Jorge Alcalá
Added: Dec 8, 2021 6:52 PM
Views: 603
Tags: no tags
  1.   $sql = 'SELECT max(k.toma) as max FROM App\Entity\Kilometrajes k
  2.      WHERE k.clavehiculo = :claVehiculo';
  3.   $query = $entityManager->createQuery($sql)->setParameter('claVehiculo', $claVehiculo);
  4.   $max = $query->getResult()[0]['max'];