Fatal error: Call to a member function FetchRow()

While browsing the “PHP Link Directory” index page, the following error is occur but no single change is made server side or script side.

Fatal error: Call to a member function FetchRow() on a non-object in index.php on line 311

To resolve the above error message, simple try to generate the mysql database backup and check the which table is crashed.

root@[~]# mysqldump –opt databasename > databasename .sql
mysqldump: Got error: 145: Table ‘./databasename /PLD_CATEGORY’ is marked as crashed and should be repaired when using LOCK TABLES

On above result the “PLD_CATEGORY” table is creased, to resolve the issue repair the table from the cPanel >> phpmyadmin or login in to the server and repair the table by using the following commands.

Login into the server as a root user.

mysql

mysql> use databasename;
Database changed

mysql> repair table PLD_CATEGORY;
+———————————-+——–+———-+———-+
| Table                            | Op     | Msg_type | Msg_text |
+———————————-+——–+———-+———-+
| databasename.PLD_CATEGORY | repair | status   | OK       |
+———————————-+——–+———-+———-+
1 row in set (0.02 sec)

mysql> \q

About Anant 373 Articles
Senior technical writer