示例#1
0
 /**
  * Class constructor 
  * 
  * @param string $error          Error message
  * @param string $errno          Error code
  * @param string $target_table
  * @param string $target_field
  * @param string $foreign_table
  * @param string $foreign_field
  */
 public function __construct($error, $errno = 0, $target_table = null, $target_field = null, $foreign_table = null, $foreign_field = null)
 {
     parent::construct($error, $errno);
     $this->target_table = $target_table;
     $this->target_field = $target_field;
     $this->foreign_table = $foreign_table;
     $this->foreign_field = $foreign_field;
 }
示例#2
0
 /**
  * Class constructor 
  * 
  * @param string $error      Error message
  * @param string $statement  Query statement
  * @param string $errno      Error code
  */
 public function __construct($error, $statement, $errno = 0)
 {
     $this->error = $error;
     $this->statement = $statement;
     parent::construct("Query failed: {$error}\nQuery: {$statement}", $errno);
 }