php - How to fetch only one enter from multiple entry -



php - How to fetch only one enter from multiple entry -

my mysql database this

i want have query fetch every element car table, 1 entry (any one) car_picture table every car.

so, want have query result -

is possible?

thanks in advance helping.

use group by 1 row per car_id.

select c.car_id, cp.car_picture_link, c.original_car_page auto c left bring together car_picture cp on c.car_id = cp.car_id grouping c.car_id

left join homecoming null columns car_picture when there's no corresponding row there.

php mysql mysqli

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -