# Error code

**URL:** <https://forum.kirupa.com/t/error-code/195806>\
**Category:** Uncategorized\
**Created:** [August 3, 2006, 9:01am UTC](https://forum.kirupa.com/t/error-code/195806 "2006-08-03T09:01:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 3, 2006, 9:01am UTC](https://forum.kirupa.com/t/error-code/195806/1 "2006-08-03T09:01:31Z")

</div>

Hello all

i have this piece of code thats within a class:

```php
$this->link = mysql_connect($host, $user, $pass);
mysql_select_db($db);
register_shutdown_function(array(&$this, 'close'));

```

I was just wondering how to place a error code onto this so instead of displating all the MySQL default i could have could not connect to database.

I know i can stop error codes being display with the @ symbol by the way.

Any help would be great. Thanks
