public function testAction() { $where = array('id' => 353); $user = new HbModel('hb_goods'); $result = $user->where($where)->select(); print_r($result); exit; }
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} }