Yii Framework Forum: Error It Showing Trying To Get Property Of Non-Object - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

Error It Showing Trying To Get Property Of Non-Object Rate Topic: -----

#1 User is offline   sanjeev4cs 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 23-November 13

Posted 07 March 2014 - 01:09 AM

$sensor = Yii::app()->zdb->createCommand("select * from tbl_sensor where stype=2 and nid=$nid order by timestamp desc limit 10")->queryAll();

if($sensor)

{ return $sensor->sdata/10; }

else

{ return null; }
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users