日韩天天综合网_野战两个奶头被亲到高潮_亚洲日韩欧美精品综合_av女人天堂污污污_视频一区**字幕无弹窗_国产亚洲欧美小视频_国内性爱精品在线免费视频_国产一级电影在线播放_日韩欧美内地福利_亚洲一二三不卡片区

解析用PHP操作MySql數(shù)據(jù)庫(kù)(DB類(lèi))(2)_PHP教程

編輯Tag賺U幣
教程Tag:暫無(wú)Tag,歡迎添加,賺取U幣!

推薦:淺析php如何判斷來(lái)訪網(wǎng)頁(yè)地址
php利用系統(tǒng)函數(shù)HTTP_REFERER判斷來(lái)訪的網(wǎng)頁(yè)地址 如注冊(cè)用戶時(shí)必須是來(lái)自某網(wǎng)址的 $str=@$_SERVER[’HTTP_REFERER’];//@為除錯(cuò)功能 if(strstr($str,www.code-123.com))// echo來(lái)自www.code-123.com; else echo其它網(wǎng)址;


function shutdown_query(query_id = ""){
this->shutdown_queries[] = query_id;
}
//取得結(jié)果集中行的數(shù)目,僅對(duì) INSERT,UPDATE 或者 DELETE
function affected_rows() {
return @mysql_affected_rows(this->connection_id);
}
//取得結(jié)果集中行的數(shù)目,僅對(duì) SELECT 語(yǔ)句有效
function num_rows(query_id="") {
if (query_id == "") query_id = this->query_id;
return @mysql_num_rows(query_id);
}
//返回上一個(gè) MySQL 操作中的錯(cuò)誤信息的數(shù)字編碼
function get_errno(){
this->errno = @mysql_errno(this->connection_id);
return this->errno;
}
//取得上一步 INSERT 操作產(chǎn)生的 ID
function insert_id(){
return @mysql_insert_id(this->connection_id);
}
//得到查詢次數(shù)
function query_count() {
return this->query_count;
}

//釋放結(jié)果內(nèi)存
function free_result(query_id=""){
if (query_id == "") query_id = this->query_id;
@mysql_free_result(query_id);
}
//關(guān)閉 MySQL 連接
function close_db(){
if ( this->connection_id ) return @mysql_close( this->connection_id );
}
//列出 MySQL 數(shù)據(jù)庫(kù)中的表
function get_table_names(){
global db_config;
result = mysql_list_tables(db_config["database"]);
num_tables = @mysql_numrows(result);
for (i = 0; i < num_tables; i++) {
tables[] = mysql_tablename(result, i);
}
mysql_free_result(result);
return tables;
}
//從結(jié)果集中取得列信息并作為對(duì)象返回,取得所有字段
function get_result_fields(query_id=""){
if (query_id == "") query_id = this->query_id;
while (field = mysql_fetch_field(query_id)) {
fields[] = field;
}
return fields;
}

分享:php教程之語(yǔ)言中switch的用法介紹
?php $czc=reg; switch($czc){ case’reg’://注冊(cè) echo注冊(cè)的代碼; break;//如果注釋掉此句,將執(zhí)行下在的代碼,否則終止 case’logout’://退出 echo退出的代碼; break; default://此代碼除了reg,logout外其它的都是執(zhí)行以下面的代碼 include’user/in

來(lái)源:模板無(wú)憂//所屬分類(lèi):PHP教程/更新時(shí)間:2010-02-25
相關(guān)PHP教程