(PHP 4, PHP 5)
mysql_fetch_row — 锟接斤拷锟斤拷锟斤拷锟饺★拷锟揭伙拷锟斤拷锟轿讹拷锟斤拷锟斤拷锟�
$result
) : array
锟斤拷锟截革拷锟斤拷锟斤拷取锟矫碉拷锟斤拷锟斤拷锟缴碉拷锟斤拷锟介,锟斤拷锟矫伙拷懈锟斤拷锟斤拷锟斤拷蚍祷锟� FALSE
锟斤拷
mysql_fetch_row() 锟接猴拷指锟斤拷锟侥斤拷锟斤拷锟绞讹拷锟斤拷锟斤拷慕锟斤拷锟斤拷锟斤拷取锟斤拷一锟斤拷锟斤拷锟捷诧拷锟斤拷为锟斤拷锟介返锟截★拷每锟斤拷锟斤拷锟斤拷锟斤拷写锟斤拷锟斤拷锟揭伙拷锟斤拷锟斤拷锟侥碉拷元锟叫o拷偏锟斤拷锟斤拷锟斤拷 0 锟斤拷始锟斤拷
锟斤拷锟轿碉拷锟斤拷 mysql_fetch_row()
锟斤拷锟斤拷锟截斤拷锟斤拷锟斤拷械锟斤拷锟揭伙拷校锟斤拷锟斤拷没锟叫革拷锟斤拷锟斤拷锟津返伙拷 FALSE
锟斤拷
锟轿硷拷 mysql_fetch_array()锟斤拷mysql_fetch_assoc()锟斤拷mysql_fetch_object()锟斤拷mysql_data_seek()锟斤拷mysql_fetch_lengths() 锟斤拷 mysql_result()锟斤拷
Returns an numerical array of strings that corresponds to the fetched row, or
FALSE
if there are no more rows.
mysql_fetch_row() fetches one row of data from the result associated with the specified result identifier. The row is returned as an array. Each result column is stored in an array offset, starting at offset 0.
Example #1 Fetching one row with mysql_fetch_row()
<?php
$result = mysql_query("SELECT id,email FROM people WHERE id = '42'");
if (!$result) {
echo 'Could not run query: ' . mysql_error();
exit;
}
$row = mysql_fetch_row($result);
echo $row[0]; // 42
echo $row[1]; // the email value
?>
Note: 锟剿猴拷锟斤拷锟斤拷 NULL 锟街讹拷锟斤拷锟斤拷为 PHP
NULL
值锟斤拷