Using innerJoin() in TableSort In the examples modules I see a simple example of tableSort with one table.
Searching online I find a post where they claim Drupal 7 allowed a db_select() object to be created and then extended it with a join(), and then the final ->extend('TableSort'); 

https://www.drupal.org/forum/support/module-development-and-code-questions/2011-12-15/dbtng-tablesort-with-joins-any

I need to do an innerJoin() which appears to be a method of the SelectQuery class, and not necessarily a method of the Tablesort class. That's why the docs I see about extenders say it's critical to invoke the TableSort in the instantiation of the db_select object. Thus, my attempt:

$get_all_members = db_select('users', 'u')-&gt;innerJoin('members', 'm', 'u.uid = m.uid')-&gt;extend('TableSort');



  Call to a member function extend() on string


is the response. Is there a way to convert a db_query into a TableSort object like it appears the extender is doing?

Or, could I find a way to combine the fields I need in these two tables to pass to the TableSort object?
The issue is addressed in the thread you referenced. Not all methods for the select class return the new query object. In particular, innerJoin() returns an alias string, not the query object.

Assign your query object so you can reference it outside of the method being called:

$query = db_select('users', 'u')-&gt;extend('TableSort')
$query-&gt;innerJoin('members', 'm', 'u.uid = m.uid');
//@TODO: add -&gt;fields() -&gt;execute() etc...