Python下PyMySQL操作类
项目中用到,网上找的都不太完善,这里记录下,按自己需要稍微做了修改类文件mysql.py#!/usr/local/bin/python3#coding:utf-8__author__ = 'merci'from flask import Flaskimport pymysqlapp = Flask(__name__)app.config.from_pyfile('../config.py')HOST =...
项目中用到,网上找的都不太完善,这里记录下,按自己需要稍微做了修改类文件mysql.py#!/usr/local/bin/python3#coding:utf-8__author__ = 'merci'from flask import Flaskimport pymysqlapp = Flask(__name__)app.config.from_pyfile('../config.py')HOST =...
一个php数据库操作类,记录下,方便以后用,是pdo的,注意有要开启pdo_mysql<?phpclass mysql_link { protected static $_dbh = null; //静态属性,所有数据库实例共用,避免重复连接数据库 protected $_dbType =&nb...