need a bit of help please, when i write my query like this it works fine
$query = db_query('select * from form_submissions where address in (select address from form_submissions group by address having count(address) > 1 '); $submissions = $query->execute();
but when i write it with drupal it should work like this? but it dont
$query = db_select('form_submissions', 'sfs')->fields('sfs', array()); $subquery = db_select('form_submissions', '')->fields('address', array())->groupBy('address')->having('count(address) > 1'); $query->condition('address', $subquery, 'in'); $submissions = $query->execute();
can someone see what im doing wrong?