All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
ASP.NET,MVC+LINQ开发一个图书销售站点(7)-图书分类管理_[Asp.Net教程]
理解PHP5中static和const关键字_[PHP教程]
Mssql批量修改权限_[SQL Server教程]
.NET,2.0正式版中无刷新页面的开发_.net资料_编程技术
使用MD5变换算法来防止穷举破译密码_[Asp.Net教程]
ASP.NET2.0,上传图片并为用户创建相应文件夹_.net资料_编程技术
Asp.net,Ajax,学习笔记5,UpdatePanel的使用(下)_[Asp.Net教程]
C#中多维数组的声明
C#,3.0新特性初步研究,Part4:使用集合类型初始化器_[Asp.Net教程]
ASP.Net下两种全局变量的设置和读取方法_[Asp.Net教程]
Reading number is top 10 pictures
这才是真正的人体艺术2
Ashlynn Brooke a group sexy photo3
In the world the most mysterious 21 place landscape1
浴室里的美女
On the verge of extinction of the beach1
The real super beauty14
Small QiShu -- ShuangShuangPan2
The most popular girls welcome eggplant
Summer is most suitable for young people to travel in China6
The world's top ten most beautiful railway station1
Download software ranking
Twenty piece of palm leaf
Tram sex maniac 2 (H) rar bag2
Be there or be square
圣殿祭司的ASP.NET.2.0.开发详解-使用C#
Eclipse 4.2.2 For Win64
linux安装大全
Boxer's Top ten classic battle8
C++编程教程第三版
Tram sex maniac 2 (H) rar bag3
Macromedia Dreamweaver 8
归海一刀 published in(发表于) 2014/2/17 7:45:53 Edit(编辑)
用PHP操作MySql数据库(DB类)_[PHP教程]

用PHP操作MySql数据库(DB类)_[PHP教程]

用PHP操作MySql数据库(DB类)_[PHP教程]
/*
* mysql数据库 DB类
* @package db
* @author yytcpt(无影)
* @version 2008-03-27
* @copyrigth http://www.d5s.cn/
*/
class db {
var connection_id = "";
var pconnect = 0;
var shutdown_queries = array();
var queries = array();
var query_id = "";
var query_count = 0;
var record_row = array();
var failed = 0;
var halt = "";
var query_log = array();
function connect(db_config){
if (this->pconnect){
this->connection_id = mysql_pconnect(db_config["hostname"], db_config["username"], db_config["password"]);
}else{
this->connection_id = mysql_connect(db_config["hostname"], db_config["username"], db_config["password"]);
}
if ( ! this->connection_id ){
this->halt("Can not connect MySQL Server");
}
if ( ! @mysql_select_db(db_config["database"], this->connection_id) ){
this->halt("Can not connect MySQL Database");
}
if (db_config["charset"]) {
@mysql_unbuffered_query("SET NAMES ’".db_config["charset"]."’");
}
return true;
}
//发送SQL 查询,并返回结果集
function query(query_id, query_type=’mysql_query’){
this->query_id = query_type(query_id, this->connection_id);
this->queries[] = query_id;
if (! this->query_id ) {
this->halt("查询失败:\nquery_id");
}
this->query_count++;
this->query_log[] = str;
return this->query_id;
}
//发送SQL 查询,并不获取和缓存结果的行
function query_unbuffered(sql=""){
return this->query(sql, ’mysql_unbuffered_query’);
}
//从结果集中取得一行作为关联数组
function fetch_array(sql = ""){
if (sql == "") sql = this->query_id;
this->record_row = @mysql_fetch_array(sql, MYSQL_ASSOC);
return this->record_row;
}



添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.