请教:mysql数据库有个游标吗

WBOY
Release: 2016-06-13 11:59:21
Original
971 people have browsed it

请问:mysql数据库有个游标吗
大哥, 我想做个PHP文件, 访问一次这个PHP文件, 从数据库取一条记录, 第二次访问, 取下一条,

如何才能实现呢?游标怎么用法,?不太会写SQL语句.  谢谢了
------解决方案--------------------

引用:
改了所有的PHP.INI,  重启服务,  还有一样错误, 奇怪了, 
我先试试将变量保存于数据库、文件、共享内存等中, 不知道哪个简单 些


那就是你服务器没有配置好了,如果先测试,可以把变量写文件吧。

$file='session.txt';
if(!file_exists($file)){
    $cursor = 0;
    file_put_contents($file, 0, true);
}else{
    $cursor = file_get_contents($file);
    $cursor ++;
    file_put_contents($file, $cursor, true);
}
  
$query="select id,title,email from cmsecms_custinfo where LIMIT $cursor, 1";
$sql=$empire->query($query);
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!