示例#1
0
文件: Index.php 项目: agui2200/yaf
 public function testAction()
 {
     $where = array('id' => 353);
     $user = new HbModel('hb_goods');
     $result = $user->where($where)->select();
     print_r($result);
     exit;
 }
示例#2
0
文件: Index.php 项目: hongwenwu/yaf
 public function swoolehttpAction()
 {
     Yaf_Dispatcher::getInstance()->autoRender(FALSE);
     $where = array('id' => 37936);
     $user = new HbModel('hb_users');
     //直接实例化给表名就行了,其他跟操作thinkphp一样
     $result = $user->where($where)->select();
     //echo $user->getlastsql();
     // echo json_encode( $result);
     echo json_encode($result);
     //返回结果{"id":37936}
 }