[drupal-devel] Re: Passing sql variables to a paged query

Axel Kollmorgen axel at kollmorgen.net
Tue Oct 18 16:24:19 UTC 2005


On 18.10.2005 17:37, Axel Kollmorgen wrote:
> eg. theme('pager', array (), 10, 0, array ('foo' => $foo, 'bar' => $bar))

possibly (probably?) preceded by

http://drupaldocs.org/api/head/function/pager_query :

Parameters
[...]
... A variable number of arguments which are substituted into the query 
(and the count query) using printf() syntax. Instead of a variable 
number of query arguments, you may also pass a single array containing 
the query arguments.

eg. pager_query('SELECT ... WHERE ... %s AND ... %s', 10, 0, NULL, array 
($foo, $bar, ...))

$foo and $bar are substituted into the query for the %s.

-- 
ax




More information about the drupal-devel mailing list