mysql操作咨询
本帖最后由 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"); 加入报错信息,搞定了,是格式问题
$query = "load data local infile " & _
"'E:\\df\\test.txt'" & _
" into table test.test;" source的还一直没有试出来。。。
页:
[1]