<?php class db { var $db; var $position=0; function sub_sql($str) { global $prefix; return str_replace("detest_",$prefix,$str); } function Sql($str) { $str=$this->sub_sql($str); $result = mysql_query($str); $i=0; while($row = mysql_fetch_array($result)) { $str_array[$i]=$row; $i++; } if(empty($str_array)) { $str_array=array(); } $this->db=$str_array; }
This is a MYSQL database operation class. Friends can download it and use it.
All resources on this site are contributed by netizens or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this site are for learning reference only. Please do not use them for commercial purposes. Otherwise, you will be responsible for all consequences! If there is any infringement, please contact us to delete it. Contact information: admin@php.cn
Related Article
20May2017
FTP is a file transfer protocol that provides client access to the file server through the File Transfer Protocol (FTP). It is used to open, log in, and close connections, and is also used to upload, download, rename, delete, and obtain files on the server. file information. PHP Chinese website provides you with 8 practical PHP ftp operation libraries for your study and reference.
19May2017
Database operation is an important part of the development process, and being proficient in database operation is an essential weapon for developers. PHP Chinese website provides you with various encapsulated PHP database operation libraries for you to download and learn.
01Jun2018
This article mainly introduces PHP's pdo-based database operation class, which can implement basic database connections, additions, deletions, modifications, and connections, etc. It also supports operations on mysql, sqlserver, oracle and other databases. Friends who need it can refer to it.
22Jun2018
This article mainly introduces PHP's pdo-based database operation class, which can implement basic database connections, additions, deletions, modifications, and connections, etc. It also supports operations on mysql, sqlserver, oracle and other databases. Friends in need can refer to the following
06Jan2017
This article mainly introduces the XML operation class implemented by PHP, involving PHP's conversion, serialization, deserialization and other related operation skills for arrays and xml. Friends in need can refer to the following
Hot Tools
PHP library for dependency injection containers
PHP library for dependency injection containers
A collection of 50 excellent classic PHP algorithms
Classic PHP algorithm, learn excellent ideas and expand your thinking
Small PHP library for optimizing images
Small PHP library for optimizing images