db()->sql - execute now
db()->sql - execute now
Freedy
Posts: 33Questions: 5Answers: 0
Hi,
Is there a way to make db()->sql commands execute now? Instead on waiting on ->process?
This discussion has been closed.
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