2015-01-05 11:14:30 3083次浏览 1条回答 0 悬赏 0 金钱

$rows = content::findBySql("select a.*,b.content from app_content as a join app_content_news as b on a.id=b.id where a.id=$id")->all();

执行后显示 Getting unknown property: app\models\content::content

补充于 2015-01-05 11:26

$rows = Yii::app()->db->createCommand("select a.*,b.content from app_content as a join app_content_news as b on a.id=b.id where a.id=$id");

这样写也不对

  • 回答于 2015-01-05 19:56 举报

    提示信息是在模型content里没有content这个属性。你自己的回答写法不对吧?我看你提问版本是2.0,但是你这个是1.x的写法!

您需要登录后才可以回答。登录 | 立即注册
tgw2000
助理

tgw2000

注册时间:2014-10-15
最后登录:2017-11-11
在线时长:10小时35分
  • 粉丝2
  • 金钱20
  • 威望0
  • 积分120

热门问题