获取重复并在循环中删除重复的uid

时间:2019-05-20 20:15:39

标签: php drupal-7

我有一个查询:

$records = db_query("SELECT uid FROM comment WHERE nid = $node->nid ORDER BY uid DESC")->fetchAll();

好的。我需要在foreach循环中得到以下结果:

<?php foreach ($records as $record): ?>
  // get count all users
  // get id and count duplicate users
  // remove duplicate users
<?php endforeach; ?>

谢谢。

0 个答案:

没有答案