0
誰能教教我怎麼才能在Laravel 4.2子查詢Laravel 4.2
SELECT
t.Truck_Number,
t.Created_dt,
t.Latitude,
t.Longitude,
t.Speed,
t.Heading
FROM
truckgps t
INNER JOIN
(
SELECT
Truck_Number,
max(Created_dt) as MaxDate
FROM
truckgps
GROUP BY
Truck_Number
) tm
ON
t.Truck_Number = tm.Truck_Number AND
t.Created_dt = tm.MaxDate
這種查詢是由其他人提供使用這樣的查詢,可以在使用laravel變得更好?