vendredi 27 avril 2018

converting raw sql to laravel query builder

I need help converting this query to a laravel query.

$sql = "SELECT*FROM `shelf` WHERE(column1 = '$col1' OR column2 = '$col1' OR column3 = '$col1' OR column4 = '$col1' OR column4 = '$col1');"
$sql = $sql.AND(column1 = '$col2' OR column2= '$col2' OR column3= '$col2' OR column4= '$col2' OR column5= '$col2');
$sql = $sql.AND(column1 = '$col3' OR column2 = '$col3' OR column3 = '$col3' OR column4 = '$col3' OR column5 = '$col3');



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire