开发者

what is flow of this zend update statement

I know that this statement updates the record in the zend framework. But I want to understand the complete flow of this statement. Statement is

$request->update($data,$request->getAdapter()->quoteInto('id = ?',$this->getRequest()->getParam('selected_id'))) )
$data is the array of records that is passed to it and $request is the object of model. I want to 开发者_Go百科know whole meaning of this statement


As you know update statement uses $table->update($data, $where);

$request is db table model. ->getAdapter gets the adapter.

Also quoteInto() is best defined as by documentation

The most typical usage of quoting is to interpolate a PHP variable into a SQL expression or statement. You can use the quoteInto() method to do this in one step. This method takes two arguments: the first argument is a string containing a placeholder symbol (?), and the second argument is a value or PHP variable that should be substituted for that placeholder.

And the last expression $this->getRequest()->getParam('selected_id').

$this->getRequest() gets the request $_GET type

And getParam('selected_id')) fetches selected_id of GET object.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜