How to join two tables with different number of rows? - development

How to join two tables with different number of rows?

I have two tables. One is about product specifications containing about 500 products. The second table is about 50 products pertaining to profit. I want to extract those 50 products from the table containing 500 products. And display both specifications and profit of the 50 products in a single table.

I tried to use whereIn and join in a single statement but it showed “Integrity Constraint violation”.



from Laravel Questions and Answers https://laravelquestions.com/laravel/how-to-join-two-tables-with-different-number-of-rows/
via Lzo Media

Comments

Popular posts from this blog

How can I solve "laravel/horizon v1.1.0 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system"? - development

Using PHP and MySQL data to generate PDF letters like in MS Word mailmerge functionality - development

CORS issue between web/android/ios