PHP mysql_data_seek() function tutorial_PHP tutorial

WBOY
Release: 2016-07-13 17:03:59
Original
1016 people have browsed it

PHP mysql_data_seek() function tutorial

Definition and usage
The mysql_data_seek() function moves the internal row pointer.

The contiguous internal pointer is currently queued as returned by the mysql_query() function.

This function returns TRUE on success, or FALSE on failure.

Grammar

mysql_data_seek(data,row)
Copy after login
参数
Copy after login
data: 从mysql_query数据库查询
Copy after login
rows:查出多少行.
Copy after login
现在我们来看个mysql_data_seek的实例吧.
Copy after login
<?
Copy after login
<pre class="brush:php;toolbar:false">$sql = "SELECT * from Person";
$result = mysql_query($sql,$con);
print_r(mysql_fetch_row($result));
Copy after login
mysql_data_seek($result,3);
print_r(mysql_fetch_row($result));
Copy after login
 
Copy after login
?>
Copy after login
 
Copy after login
Copy after login
输出的结果.
Copy after login
 
Copy after login
Copy after login
<pre class="brush:php;toolbar:false">Array
(
[0] => Refsnes
[1] => Kai Jim
[2] => Taugata
)
Copy after login
Array
(
[0] => Refsnes
[1] => Ståle
[2] => Sandnes
)
Copy after login

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/630899.htmlTechArticlePHP mysql_data_seek() Function Tutorial Definition and Usage The mysql_data_seek() function moves the internal row pointer. The contiguous internal pointer is currently ranked in the returned result of the mysql_query() function...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template