Home > Backend Development > PHP Tutorial > thinkphp插入数据库操作异常

thinkphp插入数据库操作异常

WBOY
Release: 2016-06-13 12:41:26
Original
960 people have browsed it

thinkphp插入数据库操作错误
thinkphp从excel读取数据插入mysql,生成sql语句正确,单独能执行,用
$model->execute($sql),执行时,凡是字符串都只插入了首字符。生成sql语句是这样 insert into table values('','ABCDEF'),没有列举完,只是举例,单独执行插入成功,在thinkphp里面执行,字符串ABCDEF只插入了一个A。在tp里面打印出最后执行的sql语句也是对的

thinkphp MySQL 数据库
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template