inserts of foreign-key

This commit is contained in:
Marc Delisle
2002-09-24 03:13:12 +00:00
parent 1f8d8f5437
commit 8c1f3da72a
2 changed files with 15 additions and 0 deletions

View File

@@ -224,6 +224,20 @@ else {
$val = "''";
}
break;
case '$foreign$':
// if we have a foreign key, then construct the value
$f = 'field_' . md5($key);
if (!empty($$f)) {
$val = implode(',', $$f);
if ($val == 'null') {
// void
} else {
$val = "'" . PMA_sqlAddslashes(urldecode($val)) . "'";
}
} else {
$val = "''";
}
break;
default:
if (get_magic_quotes_gpc()) {
$val = "'" . str_replace('\\"', '"', $val) . "'";