Php connects to the access database and modifies and deletes the added data instance. Php connection access database tutorial and modify delete add data instance this article provides a php connection access database and modify delete add data instance Oh, on the home page, let's tell the php Tutorial how to connect to the access database and how to modify and delete the added data instance.
This article provides a php connection to the access database and modification and deletion to add data instances. on the homepage, we will tell you to connect to the access database using php and then add, modify, and edit the database, displays the source code of the page Effects of deletion and data.
*/
$ Conn = new com ("adodb. connection ");
$ Conn-> open ("driver = {microsoft access driver (*. mdb)}; dbq =". db_path. "; uid =; pwd = ;");
$ Rs = new com ("adodb. recordset ");
$ Rs-> open ("select * from [article] order by [articleid]", $ conn, 1, 3 );
$ Rs-> pagesize = 5;
$ Page = trim ($ _ get ['Page']);
If ($ page = "" | is_numeric (intval ($ page) <= 0) {$ page = 1;} else if (intval ($ page)> $ rs-> pagecount) {$ page = $ rs-> pagecount ;}
$ Page = intval ($ page );
If (! $ Rs-> eof | $ rs-> bof ){
$ Rs-> absolutepage = $ page; $ mypagesize = $ rs-> pagesize; $ I = $ rs-> recordcount ()-($ page-1) * $ rs-> pagesize;
While (! $ Rs-> eof & $ mypagesize> 0 & $ I >=$ rs-> recordcount ()-1-$ rs-> pagesize * $ page ){
$ Articleid = $ rs-> fields (0)-> value;
$ Articletitle = $ rs-> fields (1)-> value;?>
">
Movenext; $ mypagesize --; $ I -- ;}}?>
Header page 1) {echo $ page-1;} else {echo 1 ;}?> "> Pagecount) {echo $ page + 1;} else {echo $ rs-> pagecount;}?> "> Pagecount;?> "> End pages Recordcount ();?> Article, points Pagecount;?> Page, which is Page