Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Accessing Values Gained From The Databse

$
0
0
Hi,
I'm obtaining a set of values from the database. I want to access attributes which were queried from the database... (classId and the admsiionId of each row). I tried using a loop but can't figure out how to do it...

public function actionAdmin(){
$date= "SELECT DATE(now())";
$mydate = Yii::app()->db->createCommand($date)->queryScalar();

$count="select classId,admissionId from studentattendances where Date=$mydate";
$resultset=array();
$resultset=Yii::app()->db->createCommand($count)->query();

}



Please help me.
Thank you! :)

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>