May be quickedit code (batch procedure) can be like this:
foreach ($image_ids as $key => $val) {
$set = "";
$image_keywords[$key] = preg_replace("/[\n\r]/is", " ", $image_keywords[$key]);
$image_keywords[$key] = str_replace(","," ",$image_keywords[$key]);
$image_keywords[$key] = ereg_replace("( ){2,}", " ", $image_keywords[$key]);
if ($editname && !empty($image_name[$key])) { $set.= " image_name = '"; $set.= trim($image_name[$key]); $set.= "'";};
if ($editdescription) { $set.= ", image_description = '"; $set.= trim($image_description[$key]); $set.= "'";};
if ($editkeywords) { $set.= ", image_keywords = '"; $set.= trim($image_keywords[$key]); $set.= "'";};
if ($editdate) { $set.= ", image_date = UNIX_TIMESTAMP('".$image_date[$key]."')";};
$sql = "UPDATE ".IMAGES_TABLE."
SET".trim($set, ",")."
WHERE image_id = $val";
$result = $site_db->query($sql);
if ($editkeywords) {
$search_words = array();
foreach ($search_match_fields as $image_column => $match_column) {
$image_col = $$image_column;
if (isset($image_col[$key])) {
$search_words[$image_column] = stripslashes($image_col[$key]);
}
}
add_searchwords($val, $search_words);
}
}
Because your code insert slashes in image name if it contains ".