데이터베이스/SQL

[MySQL API] mysql_unbuffered_query()

광박이 2011. 3. 3. 14:42
728x90
SQL 질의를 MySQL에 보내지만,
fetching이나 result row를 buffering하지 않는다.

【예제】
<html><body>
< ?
mysql_connect('localhost','root','root_password') or
   die("Could not connect");
mysql_select_db("mydb");
$query="select * from employees";
$result=mysql_unbuffered_query($query);
while ($row=mysql_fetch_assoc($result)) {
  echo $row["id"];
  echo $row["name"];
  echo "<br>";
}
? >
</body></html>
728x90