//修改 $sql="update buyer set username='ff123' where id $res=$pdo- exec($sql); echo '影响行数:'.$res; //查询 $sql="select * from buyer"; $res=$pdo- query($sql); foreach($res as $row){ echo $row['username'].' br/ } //删除 $sql="delete from buyer where id $res=$pdo- exec($sql); echo '影响行数:'.$res;希望本文所述对大家的php程序设计有所帮助。PHP教程