Answer the question
In order to leave comments, you need to log in
How to get one of two identical records in a table?
Hello.
I join two tables in Laravel like this:
->leftJoin('articles_categories','articles.id','articles_categories.id_article')
Answer the question
In order to leave comments, you need to log in
Add Limit = 1. I'm not very familiar with the syntax of this DBMS, but I think it will be something like this:
->leftJoin('articles_categories','articles.id','articles_categories.id_article')->limit(1)->get();
the data structure is not clear, it is not clear what you want to get. and there can be many
distinct()
first()
limit(1)
groupby()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question