# INSERT INTO Cars (price, type) VALUES (:price:, :type:)
$result = $this->modelsManager->createBuilder()
->insert('Cars', array('price' => 15000.00, 'type' => 'Sedan'))
->getQuery()
->execute();
# UDPATE Cars SET price = :price, type = :type: WHERE id = :id:
$result = $this->modelsManager->createBuilder()
->update('Cars', array('price' => 15000.00, 'type' => 'Sedan'))
->where('id = :id:', array('id' => 100))
->getQuery()
->execute();
# DELETE FROM Cars WHERE id = :id:
$result = $this->modelsManager->createBuilder()
->delete('Cars')
->where('id = :id:', array('id' => 100))
->getQuery()
->execute();
## Or alternate concept
# INSERT INTO Cars (price, type) VALUES (:price:, :type:)
$result = $this->modelsManager->createBuilder()
->insert('Cars', array('price', 'type'), array(15000.00, 'Sedan'))
->getQuery()
->execute();
# UDPATE Cars SET price = :price, type = :type: WHERE id = :id:
$result = $this->modelsManager->createBuilder()
->update('Cars', array('price', 'type'), array(15000.00, 'Sedan'))
->where('id = :id:', array('id' => 100))
->getQuery()
->execute();
Method return is Phalcon\Mvc\Model\Query\Status.
I'm afraid my expressions may be rude or hard to read, because I'm not so good at English.
I tried to think of a new method, but how about you??
Method return is Phalcon\Mvc\Model\Query\Status.
I'm afraid my expressions may be rude or hard to read, because I'm not so good at English.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.