摘要: 一、Yii操作数据库的几种选择1,PDO方式。$sql = "";//原生态sql语句xx::model()->dbConnection->createCommand($sql)->execute();2,Active Record方式(1)New$post=new Post;$post->title='sample post';$post->content='post body content';$post->save();(2)Criteria方式也可以使用 $condition 指定更复杂的查询条件。 阅读全文
posted @ 2014-02-24 17:17 FreeSpider 阅读(3566) 评论(0) 推荐(0) 编辑