phalcon: 独立的映射,字段名名别名
2024-09-27 23:10:57
class ProductsController extends \Phalcon\Mvc\Controller
{ public function saveAction()
{ //Obtain the TransactionsManager from the services container
$manager = $this->di->getTransactions(); //Or
$manager = $this->transactions; //Request a transaction
$transaction = $manager->get(); //...
} }
使用:
//Find a robot by its name
$robot = Robots::findFirst("theName = 'Voltron'");
echo $robot->theName, "\n"; //Get robots ordered by type
$robot = Robots::find(array('order' => 'theType DESC'));
foreach ($robots as $robot) {
echo 'Code: ', $robot->code, "\n";
} //Create a robot
$robot = new Robots();
$robot->code = '10101';
$robot->theName = 'Bender';
$robot->theType = 'Industrial';
$robot->theYear = 2999;
$robot->save();
最新文章
- dofile执行ANDROID APK里面的文件
- python---sys
- SQL基础语法等
- 【JavaEE】SSH+Spring Security自定义Security的部分处理策略
- Unity2D 背景图铺满与Camera.Size的计算公式
- 使用Ext.Net时,配置文件的最简单写法
- 除了创建时指定窗口位置之外,还有3种移动窗口位置的办法(移动的同时往往可以改变窗口大小)(SetWindowPos最有用,它有许多标志位)
- IIS6.0服务器搭建网站无法访问解决方法
- nginx添加需要代理的域名 配置
- ER图与UML图
- 该View转换成Bitmap方法
- peoplesoft function PSTREENODE 通过 deptid 获得部门树 一级部门 名称
- JS运动框架的封装过程(一)
- [ArcGIS API for JavaScript 4.8] Sample Code-Get Started-popups简介
- UOJ #449. 【集训队作业2018】喂鸽子
- Object constraint language for code generation from activity models
- Linux之定时器与时间管理 【转】
- vue.js如何实现点击按钮动态添加li
- HtmlUnit
- CentOS 7 系统root用户忘记密码的重置方法