2013-05-28 1 views

답변

1

이) (포드에서 사용할 수 있습니다, 몇 가지 제안이 가능합니다 또한 http://pods.io/docs/save/

<?php 
// Get the book item with an ID of 5 
$pod = pods('book', 5); 

// Set the author (a user relationship field) 
// to a user with an ID of 2 
$pod->save('author', 2); 

// Set a group of fields to specific values 
$data = array(
    'name' => 'New book name', 
    'author' => 2, 
    'description' => 'Awesome book, read worthy!' 
); 

// Save the data as set above 
$pod->save($data); 

// Or the shorthand 
$id = pods('yourpod', $id)->save($data); 

를 추가한다() - http://pods.io/docs/add/

+0

다중 관계를 어떻게 구합니까? 예를 들어 두 명의 "저자"를 좋아합니까? $ pod-> save ('author', array (1,2))가 작동하지 않습니다. – Bakaburg

+0

작성자가 2+ (또는 제한 없음)로 제한된 다중 선택 인 경우 배열을 전달해야합니다. '1,2'쉼표로 구분 된 값도 지원합니다. –

관련 문제