mysql模块
后端开发-php教程
php进销存源码erp,英文版vscode首选项,ubuntu 无限截图,下tomcat的哪个文件,跨境爬虫工具,php是什么钱,宁波百度seo软件厂家lzw
class mysql这样做看起来就只对可移植有用,其它的作用还体会不到
{
private $db; // datebase connect
private $result; // mysql result
static private $mysql; // mysql object
private function __construct()
{ // The work before Create an object
$this->db = mysql_connect('localhost','root','');
mysql_select_db('hello', $this->db );
}
public static function getObject()
{ //if have a object,return that object,Not create
if(! self::$mysql instanceof self)
self::$mysql = new self;
return self::$mysql;
}
public function query($sql)
{
$this->result = mysql_query($sql, $this->db);
return $this->result;
}
public function fetch()
{
if( isset($this->result ) )
return mysql_fetch_assoc( $this->result );
}
public function error()
{
return 'error:'.mysql_error();
}
public function num() // for sql select result
{
return mysql_num_rows( $this->result );
}
public function close()
{ // return true or false
return mysql_close( $this->db );
}
}
android电商项目源码,vscode无法运行写的代码,ubuntu 终端滚屏,tomcat 并发量单位,爬虫自动下单,ddwrt php,和平区seo万词霸屏lzw