Call to a member function get_results() on a non-object in wordpress plugin

I’m not allowed to comment to ask for more information but try putting

global $wpdb;

on the line after the

public function fetch($tableName,$where="",$orderField="",$groupByField="",$sqlAddon=""){

line

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)