Hierarchical employee management system, checkthemanualthatcorrespondstoyourMySQLserverversion what is this?

Source: Internet
Author: User
Hierarchical employee management system, checkthemanualthatcorrespondstoyourMySQLserverversion what is the error? I used hierarchy as an employee management system. when I wrote the employee paging information, how could I see this prompt: Youhaveanerro hierarchy as an employee management system, check the manual that corresponds to your MySQL server version. what is the error?
I am working on an employee management system in layers. how can I prompt You have an error in your SQL syntax when writing to employee pages; check the manual that corresponds to your MySQL server version for the right syntax to use near '6' at line 1
I said I have never seen it before. what is the problem? how can I modify it?


Require_once 'sqlhelper. class. php ';
Class EmpService {
// Set the total number of pages for getting $ 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;
}
// Set the employee information that should be displayed
Function getempLiseByPage ($ pageSize, $ pageNow ){
$ SQL = "select * from limit". ($ pageNow-1) * $ pageSize. ", $ pageSize ";
$ SqlHelper = new SqlHelper ();
$ Res = $ sqlHelper-> execute_dql ($ SQL );

// Release the resource and close the connection
Mysql_free_result ($ res );
$ SqlHelper-> close_connect ();
Return $ res;
}
}
?>

------ Solution --------------------
PHP code
$sql="select * from limit ".($pageNow-1)*$pageSize.",$pageSize";

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.