This tutorial will help you to learn find, all, one, where, orderby, count, asarray, indexby, limit, offset, like, in, between, groupby, having, addparams, scopes and findbysql in yii 2.0 framework function... Read More »
This tutorial will help you to learn find, all, one, where, orderby, count, asarray, indexby, limit, offset, like, in, between, groupby, having, addparams, scopes and findbysql in yii 2.0 framework function... Read More »
In Yii Framework 2.0, This tutorial will help you to understand the models and SQL queries command.... Read More »
This tutorial will help you to learn Relation Model, joinwith, innerJoinWith, Join, leftJoin and model query in yii framework 2.0... Read More »
Yii2.0 framework contains the Scopes functionalities. It will useful to make advanced query concept in yii model query... Read More »
CDbDataReader reads the rows from a result.CDbDataReader Query <?php $cdbdatareader = Yii::app()->db->createCommand() ->select('username, password') ->from('usermaster') ->query(); ?> columnCount & rowCount <?php echo $cdbdatareader->rowCount; echo $cdbdatareader->columnCount; ?> CDbDataReader Using read(), next() <?php $record=$cdbdatareader->read(); echo $record['username']; $cdbdatareader->next(); $record=$cdbdatareader->read(); echo $record['username']; ?> CDbDataReader Using foreach() & while()foreach()We can also retrieve the rows of data in CDbDataReader by using foreach. We can go forward only and cant take it backward. foreach($cdbdatareader as $records) { […]... Read More »