Help me solve a problem. thank you.

Source: Internet
Author: User
Help me solve a small problem. Thank you & lt ;? Phpabstractclassabs_db {// abstract class abstractprotectedfunsabconnect (); // database connection abstractprotectedfunctionselect_db (); // select database abstractprotect to help me solve a small problem. thank you.
Abstract class abs_db {// abstract class
Abstract protected function connect (); // database connection
Abstract protected function select_db (); // select a database
Abstract protected function setchar (); // character settings
Abstract protected function query (); // query
Abstract protected function getAll (); // Retrieve a portion of the query
Abstract protected function getOne (); // retrieves
Abstract protected function error ();
}
Class mysql extends abs_db {
}

?>

The error message "Class 'mysql' must implement inherited abstract method" appears in the preceding code.
'Error (...) 'What is the cause? how can this problem be solved? The compiler I use is zend studio 9.0.3.

------ Solution --------------------
That is to say, a subclass inherits a parent class, and this parent class is an abstract class. Therefore, you must implement all functions in the parent class within the subclass class.
For example:
PHP code
Abstract class A {funcA ();}

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.