remove warnings if you update 'set' and nothing is selected
This commit is contained in:
@@ -10,7 +10,6 @@ $sql_query=urldecode($sql_query);
|
|||||||
if($goto == "sql.php3")
|
if($goto == "sql.php3")
|
||||||
{
|
{
|
||||||
$goto = "sql.php3?server=$server&lang=$lang&db=$db&table=$table&pos=$pos&sql_query=".urlencode($sql_query);
|
$goto = "sql.php3?server=$server&lang=$lang&db=$db&table=$table&pos=$pos&sql_query=".urlencode($sql_query);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
reset($fields);
|
reset($fields);
|
||||||
@@ -31,16 +30,18 @@ if(isset($primary_key) && ($submit_type != $strInsertAsNewRow)) {
|
|||||||
// if we have a set, then construct the value
|
// if we have a set, then construct the value
|
||||||
$f = "field_$key";
|
$f = "field_$key";
|
||||||
if(get_magic_quotes_gpc()) {
|
if(get_magic_quotes_gpc()) {
|
||||||
$val = "'".($$f?implode(',',$$f):'')."'";
|
if (isset($$f)) $val = "'".($$f?implode(',',$$f):'')."'";
|
||||||
|
else $val = "''";
|
||||||
} else {
|
} else {
|
||||||
$val = "'".addslashes($$f?implode(',',$$f):'')."'";
|
if (isset($$f)) $val = "'".addslashes($$f?implode(',',$$f):'')."'";
|
||||||
|
else $val = "''";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if(get_magic_quotes_gpc()) {
|
if(get_magic_quotes_gpc()) {
|
||||||
$val = "'".$val."'";
|
$val = "'".$val."'";
|
||||||
} else {
|
} else {
|
||||||
$val = "'".addslashes($val)."'";
|
$val = "'".addslashes($val)."'";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user