<?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行数据怎么做?谢谢各位!
3 回答
- 3 回答
- 0 关注
- 1414 浏览
添加回答
举报
0/150
提交
取消