How can i select leftJoin table info in different field?
Table Food:
id name category other-category
1 Apple 1 2
Table Category:
id name
1 Plantae
2 Rosids
->leftJoin('Category', 'Food.category', '=', 'Category.id')
->leftJoin('Category', 'Food.other-category', '=', 'Category.id')
But I got an error:
Not unique table/alias:
Here, I want: Food.name, category.name, other-category.name
Comments
Post a Comment