Do you have something similar to<div><br></div><div>$form[&#39;pager&#39;] = array(&#39;#value&#39; =&gt; theme(&#39;pager&#39;))</div><div><br></div><div>You may also need $query-&gt;setQueryCount() instead of the addExpression <a href="http://api.drupal.org/api/drupal/includes%21pager.inc/function/PagerDefault%3A%3AsetCountQuery/7">http://api.drupal.org/api/drupal/includes%21pager.inc/function/PagerDefault%3A%3AsetCountQuery/7</a></div>
<div><br><br><div class="gmail_quote">On Mon, Oct 29, 2012 at 12:20 PM, Ms. Nancy Wichmann <span dir="ltr">&lt;<a href="mailto:nan_wich@bellsouth.net" target="_blank">nan_wich@bellsouth.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div style="font-size:12pt;font-family:Courier New,courier,monaco,monospace,sans-serif"><span style="font-family:arial,helvetica,sans-serif">Thanks, Jamie. No difference.</span><br>  $query = db_select(&#39;comment&#39;, &#39;c&#39;)-&gt;extend(&#39;PagerDefault&#39;)-&gt;limit($limit)-&gt;extend(&#39;TableSort&#39;);<br>
  $query-&gt;innerJoin(&#39;users&#39;, &#39;u&#39;, &#39;u.uid = c.uid&#39;);<br>  $query-&gt;addField(&#39;u&#39;, &#39;name&#39;);<br>  $query-&gt;addField(&#39;u&#39;, &#39;uid&#39;);<br>  $query-&gt;addExpression(&#39;COUNT(*)&#39;, &#39;number&#39;);<br>
  $query-&gt;groupBy(&#39;c.uid&#39;);<br>  $query-&gt;range(0, $limit);  <br>  $query-&gt;orderByHeader($table[&#39;header&#39;]);<br>  $result = $query-&gt;execute();<br><span style="font-family:arial,helvetica,sans-serif"> I did look at </span><span style="font-family:arial,helvetica,sans-serif">node_admin_nodes() and don&#39;t see anything significant<span> to tell me why theme_pager()
 isn&#39;t working for me.</span></span> <img alt=":(( crying"><div><span><br></span></div><div> </div><div><font color="#ff007f" face="bookman old style, new york, times, serif" size="4"><i><b>Nancy</b></i></font> <br></div>
<div><font face="arial, helvetica, sans-serif">Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.</font></div><div><br><blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;margin-top:5px;padding-left:5px">
  <div style="font-family:Courier New,courier,monaco,monospace,sans-serif;font-size:12pt"> <div style="font-family:times new roman,new york,times,serif;font-size:12pt"> <div dir="ltr"> <font face="Arial"> <hr size="1">  <b><span style="font-weight:bold">From:</span></b> Jamie Holly &lt;<a href="mailto:hovercrafter@earthlink.net" target="_blank">hovercrafter@earthlink.net</a>&gt;<br>
 <b><span style="font-weight:bold">To:</span></b>
 <a href="mailto:support@drupal.org" target="_blank">support@drupal.org</a> <br> <b><span style="font-weight:bold">Sent:</span></b> Monday, October 29, 2012 12:01 PM<br> <b><span style="font-weight:bold">Subject:</span></b> Re: [support] Pager Query D7<br>
 </font> </div> <br>
<div>
  

    
  
  <div>
    <div>When using extenders, the position of
      the extender is important. Check out:<br>
      <br>
      <a href="http://drupal.org/node/508796" target="_blank">http://drupal.org/node/508796</a><br>
      <br>
      So make sure you have the -&gt;extend right after your select.
      Then use your $query to do whatever other joins, conditions,
      fields, etc. you want. Put the limit in on that too. <br>
      <br>
      You might want to check out node_admin_nodes() in node.admin.inc
      to get a better idea.<br>
      <pre>Jamie Holly
<a href="http://www.intoxination.net" target="_blank">http://www.intoxination.net</a> 
<a href="http://www.hollyit.net" target="_blank">http://www.hollyit.net</a></pre>
      On 10/29/2012 11:49 AM, Ms. Nancy Wichmann wrote:<br>
    </div>
    <blockquote type="cite">
      <div style="font-size:12pt;font-family:tahoma,new york,times,serif">
        <div><span>I have a pager query (&quot;<span style="font-family:Courier New,courier,monaco,monospace,sans-serif">$query =
              $query-&gt;extend(&#39;PagerDefault&#39;)-&gt;limit($limit);</span>&quot;)
            coded and it is working fine. However, the <span style="font-family:Courier New,courier,monaco,monospace,sans-serif">theme(&#39;pager&#39;)</span>
            is doing nothing. It returns a null string, so I am not
            getting a pager on the page. I have searched all over D.O,
            but am apparently missing the solution.<br>
          </span></div>
        <div><span></span></div>
        <div> </div>
        <div><font color="#ff007f" face="bookman old style, new
            york, times, serif" size="4"><i><b>Nancy<br>
              </b></i></font></div>
         
        <div><font face="arial, helvetica, sans-serif">Injustice
            anywhere is a threat to justice everywhere. -- Dr. Martin L.
            King, Jr.</font></div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
    </blockquote>
    <br><span class="HOEnZb"><font color="#888888">
  </font></span></div><span class="HOEnZb"><font color="#888888">

</font></span></div><span class="HOEnZb"><font color="#888888"><br>-- <br>[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br><br> </font></span></div> </div> </blockquote>
</div>   </div></div><br>--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Earnie</div><div>-- <a href="https://sites.google.com/site/earnieboyd" target="_blank">https://sites.google.com/site/earnieboyd</a></div>
<br>
</div>