找回密码
 加入
搜索
查看: 2319|回复: 2

[AU3基础] mysql操作咨询

[复制链接]
发表于 2014-1-14 14:32:45 | 显示全部楼层 |阅读模式
本帖最后由 liangxm 于 2014-1-14 14:33 编辑

$query = "load data local infile 'E:\df\test.sql' into table test.test;"
;~                                 $query = "use test;source 'E:\df\test.sql'"
;~                 $query = "drop database test"
        _MySQL_Real_Query($MysqlConn, $query)

为啥source 或者 load data都导入不了数据呢?drop database是可以的。


CREATE TABLE `test` (
  `TimeDate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `Name` text NOT NULL,
  `My` text NOT NULL,
  `IDname` text NOT NULL,
  `User` text NOT NULL,
  `Code` text NOT NULL,
  `Result` text NOT NULL,
  `Time1` text NOT NULL,
  `Time2` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8

test.sql:
insert into test (TimeDate,Name,My,IDname,User,Code,Result,Time1,Time2) VALUES (NOW(),"00:F0:00:FF:00:FF","1","2","3","4","5","6","7");
 楼主| 发表于 2014-1-15 15:07:18 | 显示全部楼层
加入报错信息,搞定了,是格式问题

$query = "load data local infile " & _
                        "'E:\\df\\test.txt'" & _
                        " into table test.test;"
 楼主| 发表于 2014-1-15 17:06:42 | 显示全部楼层
source的还一直没有试出来。。。
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-4-20 05:41 , Processed in 0.080191 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表