Home > php教程 > php手册 > body text

PHP实现上一篇、下一篇的代码

WBOY
Release: 2016-06-06 19:50:50
Original
898 people have browsed it

欢迎进入Linux社区论坛,与200万技术人员互动交流 >>进入 主页是index.php;传递的值是id(数据库的主键);文章的数据库是article,其中文章标题的列是title 代码: ?php $queryset_former = mysql_query($sql_former); //执行sql语句 if(mysql_num_rows

欢迎进入Linux社区论坛,与200万技术人员互动交流 >>进入

  主页是index.php;传递的值是id(数据库的主键);文章的数据库是article,其中文章标题的列是title

  代码:

  

  $queryset_former = mysql_query($sql_former); //执行sql语句

  if(mysql_num_rows($queryset_former)){ //返回记录数,并判断是否为真,以此为依据显示结果

  $result = mysql_fetch_array($queryset_former);

  //

  $queryset_later = mysql_query($sql_later);

  if(mysql_num_rows($queryset_later)){

  $result = mysql_fetch_array($queryset_later);

  ?>

PHP实现上一篇、下一篇的代码

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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template