Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/mod/glossary/sql.php File Reference

Go to the source code of this file.

Variables

 $sqlorderby = ''
 Creating the SQL statements.
 $sqlsortkey = NULL
 $textlib = textlib_get_instance()
 $sqlwrapheader = ''
 $sqlwrapfooter = ''
switch($sortkey) $sqlsortorder = $sortorder
 Calculate the SQL sortkey to be used by the SQL statements later.
 $fullpivot = 1
 Pivot is the field that set the break by groups (category, initial, author name, etc)
 $params = array('gid1'=>$glossary->id, 'gid2'=>$glossary->id, 'myid'=>$USER->id, 'hook'=>$hook)
 $userid = ''
if(isloggedin()) switch($tab) $count = $DB->count_records_sql("SELECT COUNT(DISTINCT(ge.id)) $sqlfrom $sqlwhere", $params)
 $limitfrom = $offset
 $limitnum = 0
if($offset >=0) $query = "$sqlwrapheader $sqlselect $sqlfrom $sqlwhere $sqlwrapfooter $sqlorderby"
 $allentries = $DB->get_records_sql($query, $params, $limitfrom, $limitnum)

Variable Documentation

$allentries = $DB->get_records_sql($query, $params, $limitfrom, $limitnum)

Definition at line 276 of file sql.php.

if (isloggedin()) switch ($tab) $count = $DB->count_records_sql("SELECT COUNT(DISTINCT(ge.id)) $sqlfrom $sqlwhere", $params)

Initially we aren't going to perform NOT LIKE searches, only MSSQL and Oracle

will use it to simulate the "-" operator with LIKE clause

Under Oracle and MSSQL, trim the + and - operators and perform simpler LIKE (or NOT LIKE) queries

Definition at line 266 of file sql.php.

$fullpivot = 1

Pivot is the field that set the break by groups (category, initial, author name, etc)

fullpivot indicate if the whole pivot should be compared agasint the db or just the first letter printpivot indicate if the pivot should be printed or not

Definition at line 42 of file sql.php.

$limitfrom = $offset

Definition at line 268 of file sql.php.

$limitnum = 0

Definition at line 269 of file sql.php.

$params = array('gid1'=>$glossary->id, 'gid2'=>$glossary->id, 'myid'=>$USER->id, 'hook'=>$hook)

Definition at line 43 of file sql.php.

if ($offset >=0) $query = "$sqlwrapheader $sqlselect $sqlfrom $sqlwhere $sqlwrapfooter $sqlorderby"

Definition at line 275 of file sql.php.

$sqlorderby = ''

Creating the SQL statements.

SQL.PHP This file is include from view.php and print.php

Definition at line 12 of file sql.php.

$sqlsortkey = NULL

Definition at line 13 of file sql.php.

switch ($sortkey) $sqlsortorder = $sortorder

Calculate the SQL sortkey to be used by the SQL statements later.

Definition at line 35 of file sql.php.

$sqlwrapfooter = ''

Definition at line 18 of file sql.php.

$sqlwrapheader = ''

Definition at line 17 of file sql.php.

Definition at line 14 of file sql.php.

$userid = ''

Definition at line 45 of file sql.php.

 All Data Structures Namespaces Files Functions Variables Enumerations