is the order of the zip codes in the zip file the same as the order of the records ??
eg zip file
89103 - > go to first row in table ??
89230 - > go to 2nd row in table ??
89211 - > go to 3rd row in table ??
and is the primary key StreetID sequential ie 1,2,3,4,5,6,7,8 .....
if thats the case try this
<?php
$handle = fopen ("G:/My Documents/~~Web Files/StreetGuide/Database/zip01.txt", "r");
//set up database connections
//starting streetID
$x = 1;
while (!feof ($handle)){
$buffer = fgets($handle, 4096);
echo $buffer;
$query = "UPDATE streets SET zip='".$buffer."' WHERE StreetID = $x";
mysql_query($query);
$x++;
}
fclose ($handle);
?>
reg
kevin