Support the ongoing development of Laravel.io →
Database Eloquent
Last updated 1 year ago.
0

Try wrapping your SQL in DB::Raw():

$asins = DB::select(DB::raw('SELECT `AmazonASIN`.`sku` ,  `AmazonASIN`.`asin` ,  
`AmazonASIN`.`price` ,  `AmazonASIN`.`qty` ,  `AmazonASIN`.`added` 
FROM  `AmazonASIN` 
LEFT JOIN  `AmazonProducts` ON  `AmazonASIN`.`sku` =  `AmazonProducts`.`AmazonSKU` 
WHERE  `AmazonProducts`.`AmazonSKU` IS NULL 
ORDER BY  `AmazonASIN`.`added` DESC LIMIT 50000'));

without the DB::Raw(), you're "WHERE IS NULL" MIGHT be creating the problem, I'm not entirely sure though.

Last updated 1 year ago.
0

hi there am new here and am facing the same problem and i have tried DB::raw with no impact i know this post is old but i hope someone can help me

0

Sign in to participate in this thread!

Eventy

Your banner here too?

RobCubed robcubed Joined 8 Sep 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.