Below is my code, it is a script I need to run just 1 time to update a new mysql table I have added, I have 60,000 users and it ran and added 268 rows, it did not show any errors or anything, it just didnt add the rest and I have no idea why?
<?PHP
require_once "../config/functions.inc.php";
// get users
$sql = 'SELECT * FROM friend_login';
$result = executequery($sql);
while($row = mysql_fetch_assoc($result)){
// get states
$sql = 'SELECT * FROM usstates order by rand() limit 1';
$state = getSingleResult($sql);
//convert to lat and long
$geo = get_geo($state);
$lat = $geo['Latitude'];
$long = $geo['Longitude'];
//insert lat/long into locations table
$insert = "INSERT INTO friend_location (user_id, lat, `long`) VALUES ('$row[auto_id]', '$lat', '$long')";
executeQuery($insert);
echo 'user updated with ' .$state. ' <BR> userID=' .$row[auto_id]. ' <BR><BR><BR>';
}
?>