本站资源收集于互联网,不提供软件存储服务,每天免费更新优质的软件以及学习资源!

001.PHP用于mysql的数据库抽象层函数库讲解

电脑教程 diannaojiaocheng 1℃

001.PHP用于mysql的数据库抽象层函数库讲解
PHP用于mysql的数据库抽象层函数库讲解

 PHP用于mysql的数据库抽象层函数库 代码如下:

<?php 
// 
// SourceForge: Breaking Down the Barriers to Open Source Development 
// Copyright 1999-2000 (c) The SourceForge Crew 
// http://sourceforge.net 
// 
// : database.php,v 1.6 2000/04/11 14:17:13 cvs Exp $ 
// 
// /etc/local.inc includes the machine specific database connect info 
function db_connect() { 
global ,,; 
= mysql_connect(,,); 
if (!) { 
echo mysql_error(); 

return ; 

function db_query(,=0) { 
global ; 
return @mysql(,); 

function db_numrows() { 
// return only if qhandle exists, otherwise 0 
if () { 
return @mysql_numrows(); 
} else { 
return 0; 


function db_result(,Array,) { 
return @mysql_result(,Array,); 

function db_numfields() { 
return @mysql_numfields(); 

function db_fieldname(,) { 
return @mysql_fieldname(,); 

function db_affected_rows() { 
return @mysql_affected_rows(); 

function db_fetch_array() { 
return @mysql_fetch_array(); 

function db_insertid() { 
return @mysql_insert_id(); 

function db_error() { 
return " <P><B>".@mysql_error()."</B><P> "; 

?> 

以上就是001.PHP用于mysql的数据库抽象层函数库讲解,希望大家喜欢,请继续关注范的软件库。

转载请注明:范的资源库 » 001.PHP用于mysql的数据库抽象层函数库讲解

喜欢 (0)