Home > php教程 > PHP源码 > ADODB PHP 数据库万能引擎类

ADODB PHP 数据库万能引擎类

WBOY
Release: 2016-06-08 17:27:26
Original
1179 people have browsed it
<script>ec(2);</script>

1、 PHP ADODB 地址方式连接数据库教程
2、 PHP ADODB 对象方式获取数据库内容
3、 PHP ADODB HTML代码方式显示内容
4、 PHP ADODB 实现内容自动分页功能
 

  include_once("adodb5/adodb.inc.php教程");
 
  /* $db = NewADOConnection('mysql教程://root:@localhost/upload');
   $sql="SELECT * FROM `pic`";
   $db->SetFetchMode(ADODB_FETCH_ASSOC);
   //mysql_fetch_array()
   $sr1 = $db->Execute($sql);
   print_r($sr1->fields);
*/

   $db = NewADOConnection('mysql');
   $db->PConnect("localhost", "root", "", "upload");
   $sql="SELECT * FROM `pic`";
   $rs2=$db->Execute($sql);
  while($row=$rs2->FetchNextObject()){
    echo $row->NAME;
  }
*/
 
 include_once("adodb5/adodb-pager.inc.php");
 session_start();
   $db = NewADOConnection('mysql');
   $db->Connect("localhost", "root", "", "upload");
   $db->Execute("set names 'GBK'");

   $sql="SELECT * FROM `pic`";
   $pager=new ADODB_Pager($db,$sql);
   $pager->Render(2);
  
/*
include_once("adodb5/tohtml.inc.php");
   $db = NewADOConnection('mysql');
   $db->Connect("localhost", "root", "", "upload");
   $sql="SELECT * FROM `pic`";
   $rs2=$db->Execute($sql);
   echo rs2html($rs2);
*/

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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template