Home > Backend Development > PHP Tutorial > 分层做雇员管理系统,check the manual that corresponds to your MySQL server version 这是什么东东

分层做雇员管理系统,check the manual that corresponds to your MySQL server version 这是什么东东

WBOY
Release: 2016-06-13 10:29:12
Original
1548 people have browsed it

分层做雇员管理系统,check the manual that corresponds to your MySQL server version 这是什么错误?
我用分层做一个雇员管理系统,写到雇员分页那里的时候怎么会有这样的提示:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '6' at line 1
俺表示从来没有见过,是哪里出问题了,需要怎么修改呢?


  require_once 'SqlHelper.class.php';  
  class EmpService{
  //设置获取$pageCount,共有多少页
  function getpageCount($pageSize){
  $sql="select count(id) from emp";
  $sqlHelper=new SqlHelper();
  $res=$sqlHelper->execute_dql($sql);
  if($row=mysql_fetch_row($res)){
  $pageCount=ceil($row[0]/$pageSize);
  }
  mysql_free_result($res);
  mysql_close();
  return $pageCount;
  }
  //设置应该显示出来的雇员信息
  function getempLiseByPage($pageSize,$pageNow){
  $sql="select * from limit".($pageNow-1)*$pageSize.",$pageSize";
  $sqlHelper=new SqlHelper();
  $res=$sqlHelper->execute_dql($sql);
   
  //释放资源关闭连接
  mysql_free_result($res);
  $sqlHelper->close_connect();
  return $res;
  }
  }
?>

------解决方案--------------------

PHP code
$sql="select * from limit ".($pageNow-1)*$pageSize.",$pageSize";<div class="clear">
                 
              
              
        
            </div>
Copy after login
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