Using Custom Params, Custom Where and Custom Order settings

From JReviews Documentation
Revision as of 18:43, 28 October 2011 by Jreviews (Talk | contribs)

Jump to: navigation, search

Custom WHERE and Custom ORDER BY parameters are available in the Listings Module and in the Custom List JReviews menu item.

You can use them to filter listings based on certain values and order listings based on certain fields.

For example, to get all listings that have Cannon value for jr_brand custom field, we can use this in Custom WHERE parameter:

Field.jr_brand LIKE '%canon%'


If we want to order those listings by highest price, we can enter this in the Custom ORDER BY parameter:

Field.jr_price DESC


Field.jr_brand and Field.jr_price are examples of the columns in the database that can be used for Custom WHERE and Custom ORDER BY. For every listing custom field you created in the Fields Manager you can use Field.jr_fieldname format.


When checking the value of a text custom field, use this:

Field.jr_model = 'xyz'

When checking the value of a single select or radiobuttons custom field, use this (option value inside asterisks):

Field.jr_city = '*new-york*'

When checking the value of a multiple select or checkboxes custom field, use LIKE with option value inside percentages:

Field.jr_genre LIKE '%comedy%'


Other available columns are:

Listing.title
Listing title
Listing.created
Listing submission date
Listing.modified
Listing update date
Listing.created_by
User ID
Listing.hits
Number of views
Frontpage.content_id
Joomla frontpaged listing (value > 0)
Field.featured
JReviews featured listing
Totals.user_rating
Average user rating
Totals.user_rating_count
Number of user ratings
Totals.editor_rating
Average editor rating
Totals.editor_rating_count
Number of editor ratings