PHP-Phalcon????е?????????
???????????? ???????[ 2016/5/5 11:43:04 ] ????????PHP ?????
????4. ????????
??????Phalcon?в?????????????????ORM???????????????PHQL?????ORM????????дSQL???????????????????????????????????ó?????????????????????PHQL?????????дPhalcon????SQL????????????????????дSQL?????????ORM???????????й????
????### 4.1 ???????
?????????????????????????????????????:
????????????????DatabaseController
????????????????InsertAction
??????InsertAction??д?????д???:
public function insertAction()
{
$customer = new Customer();
$customer->username = 'liyi';
$customer->password = '123456';
$ret = $customer->save();
if($ret){
print_r('??????');
} else {
print_r('???????');
}
}
????4.2 ???????
????1.find????
????Phalcon????????????find??????find?????????????з?????????????????:
public function findAction()
{
$customers = Customer::find();
$result = [];
foreach ($customers as $customer) {
$result[] = [
'username' => $customer->username??
'password' => $customer->password??
];
}
$this->response->setContentType('application/json'?? 'UTF-8');
return $this->response->setJsonContent($result);
}
?????????????????find()?????????customer????????????????????????????????????foreach???б????????????????????????????????????????????????????顣
????2.findFirst????
????Phalcon?е?findFirst??????find????????÷????????????????????findFirst?????????????????????????foreach????????????????????????????????????????username????????'liyi'??????
public function findfirstAction()
{
$customer = Customer::findFirst("username = 'liyi'");
$result = [
'username' => $customer->username??
'password' => $customer->password??
];
$this->response->setContentType('application/json'?? 'UTF-8');
return $this->response->setJsonContent($result);
}
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
?????????????????????????Щ????????????????????TC???????????????Щ???????????????????????????????????????????????(java .net ?????)???mysql???????????????????ж????д???Python???????????????(DB2)??????BufferPool????????????????????????????????6??????????????????滮???????????????-????????SQL Server???????????????????λ?????PHP??SQL????????????????????Pythonд???NoSQL????????? SQL ?е????????????? SQL ?е?????????Java???????:?????MySQL???????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????