Has anyone encountered this problem before?
In CakePHP, I have it.
$this->loadModel('BankBalance'); $data = array("BankBalance"=> array(bla bla bla...); $this->BankBalance->save($data); $log = $this->BankBalance->getDataSource()->getLog(false, false); debug($log);
and debugging will return it to me
array( 'log' => array( (int) 0 => array( 'query' => 'BEGIN', 'params' => array(), 'affected' => null, 'numRows' => null, 'took' => null ), (int) 1 => array( 'query' => 'INSERT INTO bla bla bla...)', 'params' => array(), 'affected' => (int) 1, 'numRows' => (int) 1, 'took' => (float) 7 ), (int) 2 => array( 'query' => 'COMMIT', 'params' => array(), 'affected' => (int) 1, 'numRows' => (int) 1, 'took' => (float) 7 ) ), 'count' => (int) 3, 'time' => (float) 14)
In fact, the row was not inserted despite the successful message. But if I copied the generated SQL and ran it, it really inserts INSERT into the table. I also tried using saveMany, but did not do INSERTION, but still returned a successful message to me.
CakePHP is missing an error log. updateAll works fine for UPDATE. And now I'm looking for sql INSERT
I canβt even do β save to a simple table with one field (the character changes (50)), no triggers, nothing. Give me a success message, but no physical data is inserted into the table.