By ThePiston on
I'm not familiar with the exact format Drupal uses, how do I add "distinct bw.url" to this query?
$query = "SELECT nr.body, n.*, bw.urlI've tried these and I get errors:
$query = "SELECT nr.body, n.*, distinct bw.url $query = "SELECT nr.body, n.*, {distinct bw.url}
Comments
It's normally SELECT
It's normally SELECT DISTINCT nr.body .....
Have a look at these:
http://www.postgresql.org/docs/8.3/interactive/queries-select-lists.html...
http://www.postgresql.org/docs/8.3/interactive/queries-table-expressions...
ok, so i can't just select
ok, so i can't just select distinct of one of them? i guess it wouldn't matter if they were all distinct
ok - confirmed - putting it
ok - confirmed - putting it in front fixed problem and no errors - thanks