Error thrown

Call to undefined method wpdb::last_error()