Buy Now
Sign in

Distinct in Read Data

G
grantdigital
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
H
healyhatman
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
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman