<?php $db =new PDO("sqlsrv:Server=.,1433;Database=test","sa","123456"); $sql = "SELECT * FROM name"; $res = $db->query($sql); while($row = $res->fetch()){ echo $row['id'] . "," . $row['name']; echo "<br />"; }
请问,我想读取前面3行数据怎么做?谢谢各位!
捷克轩
相关分类