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编译进去
相关文档:
将Excel数据导入MySql
1.将选中的数据快儿拷贝到一个TXT文本文件中(记得把后面的空格消掉。。),假如存到“D:\data.txt”这个位置里。
2.根据要导入的数据快儿建立MySql数据库和表,然后进入命令提示符里使用命令
load data local infile 'D:\data.txt' into table exceltomysql fields terminated ......
手动建表:
CREATE TABLE `excel` (
`id` int(11) DEFAULT NULL,
`name` varchar(50) DEFAULT NULL,
`passwd` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=gb2312; 注意是gb2312
然后在连接数据库时加上:
useUnicode=true&characterEncoding=gb2312.
就ok啦! ......
启动:net start mySql;
进入:mysql -u root -p/mysql -h localhost -u root -p databaseName;
列出数据库:show databases;
选择数据库:use databaseName;
列出表格:show tables;
显示表格列的属性:show columns from tableName;
建立数据库:source fileNa ......
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 ......
这几天所作的工作涉及到数据库行转列的问题
记录一下出现的错误,以免以后再犯
举网上最通俗的例子吧
Name Subject Result
张三 语文 80
张三 数学 90
张三 物理 &n ......