Example of a Data Access Object (DataAccessObject). For more information about php, see. Data Access Object example. For more information about php, see.
The code is as follows:
_ Db = new MysqlDB (); // the operation cannot be performed here}/*** obtain and process *** @ param array $ filter // filter condition * @ param string $ field // Obtain the field * @ param int $ page // Current page * @ param int $ limit // page number */function fetch ($ filter = array (), $ field = "*", $ page = 1, $ limit = null) {$ this-> _ db-> select ($ filed) -> from ($ this-> _ table)-> where ($ filter)-> limit ($ page, $ limit ); return $ this-> _ db-> execute ();} function update () {} function delete () {} func Tion insert () {}} class MemberDAO extends BaseDAO {var $ _ table = "member" ;}$ oMember = new MemberDAO (); $ oMember-> fetch (); /*** common usage: * base class of the model layer in MVC */?>