[!--quoteo(post=353035:date=Mar 8 2006, 05:06 PM:name=XenoPhage)--][div class=\'quotetop\']QUOTE(XenoPhage @ Mar 8 2006, 05:06 PM) [snapback]353035[/snapback][/div][div class=\'quotemain\'][!--quotec--] Change the script to do one large insert instead of multiples.. something like this : [code] $query = 'INSERT INTO partsdb (p_num, p_name, p_price) VALUES '; $first = true; for ($db_index=0; $db_index < $db_entries; $db_index+=3) //a part number is every 3 lines, { if ($first) { $query .= sprintf('%d, "%s", %f)', $db_data[$db_index], $db_data[$db_index+1], $db_data[$db_index+2]); $first = false; } else { $query .= sprintf(',(%d, "%s", %f)', $db_data[$db_index], $db_data[$db_index+1], $db_data[$db_index+2]); } } mysql_query($query); [/code] [/quote] I think that solves the issue of speed, however it still refuses to insert the data. heres what an an actual insert after varables have been dereferenced looks like: INSERT INTO partsdb (p_num, p_name, p_price) VALUES ('1234', 'woot (Stuff)', '1234'), ('1234', 'woot (Stuff)', '1234'), ('1234', 'woot (Stuff)', '1234'), ('1234', 'woot (Stuff)', '1234'), ('1234', 'woot (Stuff)', '1234'), ('1234', 'woot (Stuff)', '1234'), ('1234', 'woot (Stuff)', '1234'), ('1234', 'woot (Stuff)', '1234'), ('1234', 'woot (Stuff)', '1234') only theres a crap load more, but its in the same exact format. edit: heres the code as of current. [code] $query = "INSERT INTO partsdb (p_num, p_name, p_price) VALUES "; for ($db_index=0; $db_index < $db_entries; $db_index+=3) //3 lines per part: number, description, price. { $plusOne=$db_data[$db_index+1]; $plusTwo=$db_data[$db_index+2]; if ($db_index !== 0) $query .= ", "; $query .= "('" . $db_data[$db_index] . "', '" . $plusOne . "', '" . $plusTwo . "')"; } mysql_query($query); [/code]