mysqli与mysql区别
mysql是非持继连接函数而mysqli是永远连接函数。也就是说
mysql每次链接都会打开一个连接的进程而mysqli多次运行mysqli将使用同一连接进程,从而减少了服务器的开销
有些朋友在编程的时候,使用new mysqli('localhost', usenamer', 'password', 'databasename');总是报错,Fatal error: Class 'mysqli' not found in d:\...
mysqli类不是php自带的吗?
不是默认开启的,win下要改php.ini,去掉php_mysqli.dll前的;,linux下要把mysqli编译进去
相关文档:
查看服务器目前状态信息的命令,两种方式:
1. 命令行,进入mysql/bin目录下,输入mysqladmin extended-status
2. 连接到mysql,输入show status;
3. 如果要查看某个数据,可以
mysql> show s ......
下午看了一段PHP100的视频。
也算有点收获。
里面的一段自写的findall的SQL函数:
public function findall($table) {
$this->query("SELECT * from $table");
}
原来只是这么简单,刚还在思考。
使用了TAB键上面的顿号来修饰MYSQL里的字段名,如:
UPDATE tablename SET `fieldname`='values' wh ......
将Excel数据导入MySql
1.将选中的数据快儿拷贝到一个TXT文本文件中(记得把后面的空格消掉。。),假如存到“D:\data.txt”这个位置里。
2.根据要导入的数据快儿建立MySql数据库和表,然后进入命令提示符里使用命令
load data local infile 'D:\data.txt' into table exceltomysql fields terminated ......
Explain MySQL architecture
. - The front layer
takes care of network connections and security authentications, the
middle layer does the SQL query parsing, and then the query is handled
off to the storage engine. A storage engine could be either a default
one supp ......
I found a solution to anyone else who may be having this problem.
First start mysql using skip grant tables
root@ns1 [/var/lib/mysql/mysql]# service mysql start --skip-grant-tables
Starting MySQL [ OK ]
now with mysql started, you can repair the mysql/user table
root@ns1 [/var/lib/mysql ......