0
$name = $_POST['name'];
$statement = $db->prepare("SELECT * FROM authors WHERE name = ?");
$statement->execute(array($name));
$author_id = $statement->fetch()["id"];
$statement = $db->prepare("SELECT * FROM quotes WHERE author_id = ?");
$statement->execute(array($author_id));
$result = $statement->fetchAll(PDO::FETCH_ASSOC);
foreach ($result as $row) {
$quote = $row['quote'];
}
어떻게 laravel 쿼리 작성기에서 동일한 작업을 수행 할 수 있습니까?Laravel 쿼리 빌더 다중 테이블 가져 오기
의 작업은 ,, 너무 많이 U 감사합니다. –