# Return function ERROR MESSAGE

**URL:** <https://forum.kirupa.com/t/return-function-error-message/281025>\
**Category:** Uncategorized\
**Created:** [February 4, 2009, 2:07am UTC](https://forum.kirupa.com/t/return-function-error-message/281025 "2009-02-04T02:07:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![drummer392](https://avatars.discourse-cdn.com/v4/letter/d/45deac/32.png) [@drummer392](https://forum.kirupa.com/u/drummer392)\
**Post date:** [February 4, 2009, 2:07am UTC](https://forum.kirupa.com/t/return-function-error-message/281025/1 "2009-02-04T02:07:41Z")

</div>

Okay, I am getting this error message. I have fixed this on a different function, but I don’t know what to do here.

Here is the error message

```php
Fatal error: Call to a member function on a non-object in /homepages/18/d166983733/htdocs/admin/newclientinfo.php on line 22

```

Here is line 22

```php
return($result->fetch_assoc());

```

Here is the function in which this code is found

```php
function get_clientrec_record($clientrec)
{
  $query = "select * from clienttable where id = '$clientrec'";
  $result = mysql_query($query, $handle);
  return($result->fetch_assoc());
}

```
