|
Posted by Roco3D on 02/16/06 01:12
exist a way to avoid an object creation on error??
i have this on php5.0.5
public function __construct(){
@list($this->DSN,
$this->DBuser,
$this->DBpass) = func_get_args();
$this->res =
odbc_connect($this->DSN,$this->DBuser,$this->DBpas$
if(!is_resource($this->res)){
echo odbc_error()."<br>\n".odbc_errormsg();
/// here put something to avoid contruction of the
object
}
}
in the script i have this:
$db = new DbCon('dsn','user','pass');
if(is_object($db)){
//do some
}else{
//do some
}
[Back to original message]
|