last_error($return_value = 0)

Prints out value for last error generated by the current class.

If   $return_value is TRUE - the string is returned by the function, otherwise, the function echo's the information and returns 1

Example:

example.php
<?php
include("lib.php");
load("person");

$p = new person();
if (!
$p->insert())
{
    
$p->last_error();
    
// this error would tell you that you have not set fields which are marked as NOT NULL
}


?>