$sql="insert into tablename set "; $ext=""; //如果不需要把id也一起导入过去,这里可以unset($rs['id']);再执行下面 foreach($rs as $key=>$value){ $sql.=$ext."`{$key}`='{$value}'"; $ext=","; } mysql_query($sql,$conn2); }
大概就是这样。
Statement:
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