2017-03-29 15 views
0

laravel을 사용하여 이와 비슷한 쿼리를 어떻게 수행 할 수 있습니까?Laravel의 Query_while

$GLOBALS['db']->query_while("SELECT * FROM games 
WHERE id_gioco='".$id_gioco."' AND id_utente='".$USER['id']."'"); 

laravel 및 Eloquent의 문서에서 query_while는 발견되지 않았습니다.

답변

1

잠시 동안의 쿼리는 확실하지 않지만 다음은 작동해야합니다. 체인을 2로 묶는다면 절은 AND가됩니다.

$games = Game::where('id_gioco', $id_gioco)->where('id_utente', $user->id)->get()