inserts of foreign-key
This commit is contained in:
@@ -11,6 +11,7 @@ $Source$
|
|||||||
* lang/galician: update, thanks to Xos<6F> Calvo
|
* lang/galician: update, thanks to Xos<6F> Calvo
|
||||||
* lang/chinese_*: update, thanks to Siu Sun (siusun)
|
* lang/chinese_*: update, thanks to Siu Sun (siusun)
|
||||||
* lang/indonesion: update, thanks to Rachim Tamsjadi (tamsy)
|
* 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>
|
2002-09-23 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
||||||
* libraries/display_tbl.lib.php3, tbl_change.php3: coding standards
|
* libraries/display_tbl.lib.php3, tbl_change.php3: coding standards
|
||||||
|
@@ -224,6 +224,20 @@ else {
|
|||||||
$val = "''";
|
$val = "''";
|
||||||
}
|
}
|
||||||
break;
|
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:
|
default:
|
||||||
if (get_magic_quotes_gpc()) {
|
if (get_magic_quotes_gpc()) {
|
||||||
$val = "'" . str_replace('\\"', '"', $val) . "'";
|
$val = "'" . str_replace('\\"', '"', $val) . "'";
|
||||||
|
Reference in New Issue
Block a user