EllisLab text mark
Advanced Search
     
trans_status() misdocumented
Posted: 24 October 2007 10:34 PM   [ Ignore ]
Joined: 2007-02-05
5 posts

The user guide says:

if ($this->db->trans_status() === FALSE)
{
    
// generate an error... or use the log_message() function to log your error

However, the code for trans_status() does this:

return $this->_trans_failure

But _trans_failure is set like this:

// Run the Query
if (FALSE === ($this->result_id $this->simple_query($sql)))
{
    
// This will trigger a rollback if transactions are being used
    
$this->_trans_failure TRUE;

Hence, trans_status() returns TRUE on failure, not false…

 
Posted: 25 October 2007 12:24 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2006-03-23
3194 posts

Could you file a bug report for this please?

 Signature 

DerekAllard.com - CodeIgniter, ExpressionEngine, and the World of Web Design