💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
# Class **Phalcon\Mvc\Model\Query\Status**[](# "永久链接至标题") *implements*[*Phalcon\Mvc\Model\Query\StatusInterface*](#) This class represents the status returned by a PHQL statement like INSERT, UPDATE or DELETE. It offers context information and the related messages produced by the model which finally executes the operations when it fails ~~~ <?php $phql = "UPDATE Robots SET name = :name:, type = :type:, year = :year: WHERE id = :id:"; $status = $app->modelsManager->executeQuery($phql, array( 'id' => 100, 'name' => 'Astroy Boy', 'type' => 'mechanical', 'year' => 1959 )); \//Check if the update was successful if ($status->success() == true) { echo 'OK'; } ~~~ ### Methods[](# "永久链接至标题") public **__construct** (*unknown* $success, [*unknown* $model]) public **getModel** () Returns the model that executed the action public **getMessages** () Returns the messages produced because of a failed operation public **success** () Allows to check if the executed operation was successful | - [索引](# "总目录") - [下一页](# "Class Phalcon\Mvc\Model\Relation") | - [上一页](# "Abstract class Phalcon\Mvc\Model\Query\Lang") | - [API Indice](#) »