[ "db":protected] => object(ThinkDbDriverMysql)#8 (19) {
["dbType":protected] => NULL
["autoFree":protected] => ["モデル ":protected] => string(7) "_think_"
["pconnect":protected] => bool(false)
["queryStr":protected] => string(0) ""
[" modelSql ":protected] => array(0) {
}
["lastInsID":protected] => NULL
["numRows":protected] => int(0)
["numCols":protected] = > int(0)
["transTimes":protected] => int(0)
["error":protected] => string(0) ""
["linkID":protected] =>配列 (0) {
}
["_linkID":protected] => NULL
["queryID":protected] => NULL
["connected":protected] => ["autoinc " :protected] => bool(false)
["patchValidate":protected] => bool(false)
ディスカッションへの返信 (解決策)
<?phpnamespace Home\Model;use Think\Model\ViewModel;class PicViewModel extends ViewModel{ public $viewFields =array( 'picture'=> array('picTitle','picToken','picCategroy','picAuthor','picPostTime','_type'=>'LEFT'), 'picture_attachment' =>array('pictureid','pictureurl','creattime','_on'=>'picture.picToken = picture_attachment.pictureid'), );}
public function Pic(){ $PicModel =D('PicView'); dump($PicModel); $s = $PicModel->select(); dump($s); }
親切な方々、ありがとうございます。2 つのテーブルのフィールドの順序が異なることが原因です。他のフレームワークは使いやすいです。