2016-09-23 2 views
0

이것은 내 코드입니다.Drupal 8 테이블에서 데이터를 가져 옵니까?

 $connection = Database::getConnection(); 
    $sth = $connection->select('node_field_word_record', 'x') 
     ->fields('x', array('field_word_record_useruuid')); 
    $data = $sth->execute(); 
    $results = $data->fetchAll(\PDO::FETCH_OBJ); 
    print_r($results); 

이지만 $ _results는 비어 있습니다.

table

이 오류 메시지입니다.

Drupal\Core\Database\DatabaseExceptionWrapper:Drupal\record_json\Controller\RecordJsonController->save_words() 中的 SQLSTATE[42S02]: Base table or view not found: 1146 Table 'fire.node_field_word_record' doesn't exist: SELECT x.field_word_record_useruuid AS field_word_record_useruuid FROM {node_field_word_record} x; 

장소 도와주세요!

답변

0

내 녀석들의 멍청한 멍청이 였고, 롱은 node_field_word_record이고, 누락 된 부분은 _이고, 오른쪽 테이블 이름은 node__field_word_record입니다.

관련 문제