How do I add a limit to update-query in Zend Framework?

后端 未结 2 1110
别跟我提以往
别跟我提以往 2021-01-14 10:25

How do I add the LIMIT 1 clause to an update when using Zend Framework?

I\'m kind of forced not to use Zend_Db_Table_Abstract::update() since it execute

相关标签:
2条回答
  • 2021-01-14 10:59

    You can not.

    There is an issue created for this exact problem at the issue tracker. But this feature is still not implemented.

    0 讨论(0)
  • 2021-01-14 11:06

    Why would you want to do that??? If you want to update a single record you should use the records' primary key and use an

    UPDATE <table> SET field=<newvalue>, ... WHERE key = <keyvalue>;
    

    query.

    0 讨论(0)
提交回复
热议问题