<code><?php namespace Common\Model; /** * 无法使用 */ class MessageViewModel extends \Think\Model\ViewModel { protected $connection = "DB_CONF_MAN"; protected $viewFields = array( "Message" => array( "*", "_type" => "LEFT", ), "MessageText" => array( "title", "content", "_on" => "Message.message_text_id = MessageText.id", ) ); } </code>
$connection
can operate the specified database normally<code><?php namespace Common\Model; /** * 无法使用 */ class MessageViewModel extends \Think\Model\ViewModel { protected $connection = "DB_CONF_MAN"; protected $viewFields = array( "Message" => array( "*", "_type" => "LEFT", ), "MessageText" => array( "title", "content", "_on" => "Message.message_text_id = MessageText.id", ) ); } </code>
$connection
can operate the specified database normally
Never used it, passing by