Jamroom Logo Jamroom 5 Core
is now Open Source!
Follow Jamroom on Twitter!

dbNumberRows Function Index dbQuery

The dbPagedQuery function is a "paginator" for db results. It does NOT create any of the output, but will return an array consisting of the actual data, and the "prev" and "next" pages, if they exist

  • return: returns array of data
array dbPagedQuery (string $query, int $start, int $count, [string $_ret = 'NUMERIC'], [string $c_query = false])
  • string $query: SQL query to run
  • int $start: Numerical offset (start) of first row to return (default 0)
  • int $count: Number of rows to return
  • string $_ret: Return type for data. This can be any of the valid return types as used by dbQuery().
  • string $c_query: optional Counting Query that will be used in place of primary query to retrieve row count.
Brian, 11/11/09 23:01:29:

The purpose of the "Counting Query" is to return the TOTAL NUMBER OF ROWS that meet your criteria. If your SQL does not have any WHERE conditions, it is faster to grab the total number of rows using dbNumberRows(), and pass in that number - i.e.

$num = dbNumberRows($jamroom_db['band_info']);

Then pass in $num as the $c_query.
You must be logged in to post a comment
Solutions Products Support Community Company
Social Media Platform
Social Networking Software
Musician Website Manager
Community Builder
Jamroom 5
Jamroom 5 Modules
Jamroom Marketplace
Support Forum
Support Center
Contact Support
Community Forum
Member Sites
About Us
Contact Us
Privacy Policy
©2003 - 2023 The Jamroom Network