$totalResourceSubquery
$totalResourceSubquery :
string
SQLSTATEMENTS
Some default SQL statements/clauses for LIST/SEARCH operations.
getExportSql() :
Produce a SQL statement for exporting bibliographies that is not LIMITed or paged alphabetically -- i.e. all resources in the query are gathered.
The SQL statement is base64_encoded and returned to the calling script (usually plugins/importexportbib/EXPORTCOMMON::getSQL()) Large numbers of rows can exhaust PHP memory so we return an array of query statements to be executed. The number of statements is set by $totalPossible. The calling script should cycle through these statements and concatenate the results of each. By trial and error, c.1500 rows seems to be the limit with PHP memory of 64M
listSubQuery( order = FALSE, queryString = FALSE, totalSubQuery = FALSE, table = resource, subQ = FALSE) :
Create subquery initial order SELECT statement with minimal fields.
Function specific to core/modules/list/LISTRESOURCES.php (Quick List ALL operations), QUICKSEARCH.php and core/modules/basket/BASKET.php
order | Default is FALSE |
|
queryString | Default is FALSE |
|
totalSubQuery | Default is FALSE |
|
table | default is 'resource' |
|
subQ | SQL subquery for input to COUNT operations |
TRUE if resources found, FALSE otherwise
excludeBib( bibId, matchField = resourceId) :
Create SQL statement to exclude resources in a list being returned if they exist in a user bibliography. Used from Advanced Search.
result is a tidied SQL condition such as:
(matchField
NOT IN (
SELECT userbibliographyresourceResourceId
FROM WKX_user_bibliography_resource
WHERE (userbibliographyresourceBibliographyId
= 1)
)
bibId | ||
matchField | databasefield to be searched for Default 'resourceId' |
useBib( joinField = FALSE) :
Set SQL condition and join clauses if we are browsing a user bibliography to ensure that listed or searched resources come only from that user bibliography.
joinField | The resource ID field on which to join the user_bibliography_resource table. Default is FALSE |