ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

Distinct in Read Data

grantdigital 30 May, 2018
How would I use the read data to find Distinct values in the database?

Example of query below, what I cant work out is how to get to add 'DISTINCT' to the query
SELECT DISTINCT name FROM table
healyhatman 30 May, 2018
Fields to retrieve:
DISTINCT( model.field ):model.alias

If that doesn't work for some odd reason, get rid of the brackets.

For more complicated queries you need to separate commas and whatnot with spaces and always include the model. For example:
COUNT( DISTINCT if(job.client_id is null , '' , job.client_id) , if(job.client_name is null , '' , job.client_name)):countof.clients
This topic is locked and no more replies can be posted.

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com