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

@@ -11,6 +11,7 @@ $Source$
* lang/galician: update, thanks to Xos<6F> Calvo
* lang/chinese_*: update, thanks to Siu Sun (siusun)
* lang/indonesion: update, thanks to Rachim Tamsjadi (tamsy)
* tbl_replace.php3: inserts and foreign keys, thanks to Markus L. Noga
2002-09-23 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* libraries/display_tbl.lib.php3, tbl_change.php3: coding standards

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) . "'";