db()->sql - execute now
db()->sql - execute now
![Freedy](https://secure.gravatar.com/avatar/993f876166d50d3634635f09384ffe18/?default=https%3A%2F%2Fvanillicon.com%2F993f876166d50d3634635f09384ffe18_200.png&rating=g&size=120)
Hi,
Is there a way to make db()->sql commands execute now? Instead on waiting on ->process?
This discussion has been closed.
Hi,
Is there a way to make db()->sql commands execute now? Instead on waiting on ->process?
Replies
If you are calling
$db->sql()
yourself it will execute immediately.Can you show me your script please?
Allan
->on( 'preEdit', function ( $e, $id, $values ) {
$result = $e->db()->sql("INSERT INTO orders (OrderID, TotalUnits, Date) VALUES ('".$newWO."', .$numUnits."', ".$curDate."')");
some other code which depends on the above being executed.
}
after some digging I found it get executed by
if ( $this->_transaction ) {
$this->_db->commit();
Thanks for posting back - good to hear you got it working.
Allan