Home > Database > Mysql Tutorial > body text

关于 Yii 的 DAO数据库操作的总结

WBOY
Release: 2016-06-07 15:41:51
Original
1217 people have browsed it

$sql1=select count(*) as c from zhiban where date= '{$time}'; $d_obj=Yii::app()-db-createCommand($sql1); $info=$d_obj-queryAll(); 1.写sql语言 2.通过yii 的app()实例调用方法执行 sql 得到一个结果对象 3.通过querryAll方法获得数组形式的结果集

 $sql1="select count(*) as c  from zhiban where date= '{$time}'";
 $d_obj=Yii::app()->db->createCommand($sql1);

 $info=$d_obj->queryAll();

1.写sql语言

2.通过yii 的app()实例调用方法执行 sql 得到一个结果对象

3.通过querryAll方法获得数组形式的结果集


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template