커피와 개발자

[MySQL API] mysql_unbuffered_query() 본문

데이터베이스/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

'데이터베이스 > SQL' 카테고리의 다른 글

[MySQL API] mysql_thread_id()  (0) 2011.03.03
[MySQL API] mysql_tablename()  (0) 2011.03.03
[MySQL API] mysql_stat()  (0) 2011.03.03
[MySQL API] mysql_set_charset()  (0) 2011.03.03
[MySQL API] mysql_result()  (0) 2011.03.03
Comments