# Fatal error: Call to a member function num_rows() on a non-object



## bazzupp (Sep 8, 2008)

Hi I am having trouble with my script the error I get is


```
[B]Fatal error[/B]: Call to a member function num_rows() on a non-object in
```
The line that is causing the error is


```
if ($langQuery->num_rows() > 0)
```
Any ideas whats wrong

regards


----------



## Anthony:-P (Nov 24, 2006)

Hi Bazzupp,

Can you copy the num_rows() function from the class please?

Also, have you called the class at the start of the script?

I.e. $var = new class();

Kind Regards,
Anthony


----------

