匹配两个后续pdo获取的行

时间:2015-08-06 18:17:04

标签: php pdo

在使用PDO的经典while语句中,我想比较2个后续数据库行。例如,像这样:

<?php while ($r2 = $stm->fetch()): 
   if ($r2['ruolo'][first bd table row]==$r2['ruolo'][second db table row]) {
        do some stuff...
}
?>

我想直接比较2个数据库行;这有可能,怎么样?

0 个答案:

没有答案