PV Standard Search Query

15
What Were You Searching For Again? www.prodigyview.com

description

Use the standard search query for searching for information within ProdigyView.

Transcript of PV Standard Search Query

Page 1: PV Standard Search Query

What Were You Searching For Again?

www.prodigyview.com

Page 2: PV Standard Search Query

Standard Search Query

Purpose: Learn on to modify and customize select queries in ProdigyView without modifying the core.

Requirements

• Installed Version of ProdigyView

• A basic understanding of SQL

Estimated Time: 5 minutes

www.prodigyview.com

Page 3: PV Standard Search Query

Overview What is the Standard Search Query?

Custom Where

Custom Join

Custom Select

Group By

Having

Order By

Limit

Prequery

Pagination

www.prodigyview.com

Page 4: PV Standard Search Query

What Exactly is the ‘Standard Search Query’

To begin, all elements of ProdigyView can be search through by their list functions. Examples:

pv_getContentList()

pv_getApplicationList()

pv_getMenuList()

pv_getUserList()

etc etc etc

What the lists really are is SQL SELECT statements. What the Standard Search Query is a standardization of each list that allows developers to modify the select statement.

www.prodigyview.com

Page 5: PV Standard Search Query

Parts of A Select Statement

To effectively use the Standard Search Query, you should know the parts/clauses of a select statement. Lets take a second to review those parts.

PREQUERY[DATABASE DEPEDENT]

SELECT LIST

JOINS

WHERE

GROUP BY

HAVING

ORDER BY

LIMIT[DATABASE DEPENDENT]

When converted into SQL, those parts should look something like this in a PSUEDO code and then in a query.

[PREQUERY] SELECT [SELECT LIST] FROM TABLE [JOINS][WHERE][HAVING][GROUP BY][ORDER BY]

SELECT id, name FROM EXAMPLE_TABLE WHERE name=‘John’ ORDER BY registration_date LIMIT 5

Page 6: PV Standard Search Query

Custom WhereThe custom where allows modification of the WHERE part of a select statement.

www.prodigyview.com

Page 7: PV Standard Search Query

Custom SelectThe Custom Select allows modification of the select list of the select query. Otherwise the ‘*’ is used to select all elements.

www.prodigyview.com

Page 8: PV Standard Search Query

Custom JoinCustom Join allows joining tables.

www.prodigyview.com

Page 9: PV Standard Search Query

Group By

Group By will allow modification of the Group By clause of a select statement.

Page 10: PV Standard Search Query

HavingCustomize the Having part of the SELECT query.

Page 11: PV Standard Search Query

Order ByOrder By will select the order in which your select will return values. Use ASC and DESC if needed.

Page 12: PV Standard Search Query

LIMITThe Limit is database dependent. In a database like mysql the limit will be attached to the end of the query. In SQL Server, the limit will be attached to the beginning of the and will be changed to TOP. But the difference is not something the developer needs to worry about since ProdigyView takes cares of it automatically.

Page 13: PV Standard Search Query

PREQUERYSimilar to the Limit, the Prequery is a database dependent function. It puts variables before the the select statement. The next example uses SQL Server as the database.

Page 14: PV Standard Search Query

PaginationProdigyView does offer pagination and it is part of the Standard Search Query. But pagination has enough material that it warrants its own tutorial and will not be covered in this one.

www.prodigyview.com

Page 15: PV Standard Search Query

The EndCongratulations!

You’ve come to the end on the tutorial of how to use custom queries. Remember to use the queries to expand the limitations of ProdigyView quickly and easily.

www.prodigyview.com