oOC | |
2005/06/27 | MySQLPHP𗘗pZimyphp/zipdb.phpj̕s |
G[ڍ | kCn070-0000isĵ悤0n܂X֔ԍ̌s܂B |
C |
myphpziptH_zipdb.phpfunction create()ňȉ̕āA$array[0]VONI[e[VŊ܂i$array[0]'$array[0]'jB ---CO--- // X֔ԍf[^i[ [email protected]($sourcefile,"r") or die("$sourcefileJ܂"); while(!feof($file)){ $data=fgets($file,1024); $array=explode("<>",$data); $sql="insert into zip(zip,address) values($array[0],'$array[1]')";̍sC if(!$res=mysql_query($sql)){ echo mysql_error(); echo " f[^i[Ɏs܂"; exit(); } } ---C--- // X֔ԍf[^i[ [email protected]($sourcefile,"r") or die("$sourcefileJ܂"); while(!feof($file)){ $data=fgets($file,1024); $array=explode("<>",$data); $sql="insert into zip(zip,address) values('$array[0]','$array[1]')"; if(!$res=mysql_query($sql)){ echo mysql_error(); echo " f[^i[Ɏs܂"; exit(); } } ̏CsɁAZf[^i[e[u߂č쐬ȂĂB ȏŏC͏IłB |