PHP-Phalcon????е?????????
???????????? ???????[ 2016/5/5 11:43:04 ] ????????PHP ?????
????3.findBy<????>????
??????Phalcon????????findBy<????>?????????????????У???????????????findFirstByUsername??????????????????????
????$customer = Customer::findFirstByUsername('kirineko');
????4.????????????
??????????????????????????????SQL?????????????????????ò??????????????????????????????в???username=(@?????????)????password=(@?????????)???????????????ò??????????
??????????????????????????????????????????????????????н??в??????????????????????????????????????????
public function loginAction()
{
$username = $this->request->getPost('username');
$password = $this->request->getPost('password');
$conditons = 'username = :username: and password = :password:';
$parameters = [
'username' => $username??
'password' => $password??
];
$ret = Customer::findFirst(
[
$conditons??
'bind' => $parameters??
]);
if($ret){
print_r('login success');
} else {
print_r('login failed');
}
}
????4.3 ????????
???????????????????????????????????鵽???????????и???????save???ɡ????????????????kirineko???????????????????????????:
public function updateAction()
{
$password = $this->request->getPost('password');
$newpassword = $this->request->getPost('newpassword');
$conditons = 'username = :username: and password = :password:';
$parameters = [
'username' => 'kirineko'??
'password' => $password??
];
$customer = Customer::findFirst([
$conditons??
'bind' => $parameters??
]);
if($customer){
$customer->password = $newpassword;
$customer->save();
print_r('???3??');
} else {
print_r('???????????????????');
}
}
????4.4 ???????
????Phalcon??????delete?????????????????????????liyi???????????????:
public function deleteAction()
{
$customer = Customer::findFirstByUsername('liyi');
if($customer){
$res = $customer->delete();
if($res) {
print_r('??????');
} else {
print_r('??????');
}
} else {
print_r('?????????');
}
}
???????????????????????漰???????????????????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 ??????