Jump to content

upload multiple rows into mysql at once


spires

Recommended Posts

Sorry, Half a sleep.  ;)

 

 

I've got it working now

	foreach ($keyword_array as $keyword) {
		$keyword = trim($keyword);


		$sel_sql = "SELECT * FROM blackberry ORDER BY id DESC";
		$sel_query = mysql_query($sel_sql) or die (mysql_error());
		$count = mysql_num_rows($sel_query);

while($keyword){
		$row = mysql_fetch_array($sel_query);
		$keyID = $row['id'];
}
         $sql = "INSERT INTO blackberry (keywords, code, engine, merchant) VALUES ('$keyword', '$eng$keyID', '$engine', '$merchant')";
         mysql_query($sql) or die (mysql_error());


   $key .= trim($keyword)."<br>";
		}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.