I'm trying to build the column sent_storename with my whereRaw statement. But when I try to concatenate the values, the query doesn't work. When I fix the column it works. How can I do this?
$query = $this->model->getQuery()->where('products.environment_hash', $hash )->whereRaw('products.deleted_at is null');
$query->select('sku_config','name', 'stock_quantity', 'color', 'size', 'special_price', DB::raw('(special_price/default_price-1)*100 as profit_mark'));
$query->leftJoin('ads', 'ads.product_id', '=', 'products.id');
$query->whereRaw("products.sent_? = 0", array('storename'));
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2buZWW8
via IFTTT
Aucun commentaire:
Enregistrer un commentaire