use SELECT * instead of SELECT protected fields

This commit is contained in:
Michal Čihař
2003-04-17 16:02:18 +00:00
parent 6795932dfe
commit 4daf780a29
2 changed files with 3 additions and 11 deletions

View File

@@ -7,6 +7,8 @@ $Source$
2003-04-17 Michal Cihar <nijel@users.sourceforge.net>
* tbl_replace_fields.php3: Fix typo.
* tbl_replace.php3: Use rather SELECT *, as selecting only BLOB causes
MySQL sometimes problems...
2003-04-17 Garvin Hicking <me@supergarv.de>
* tbl_replace_fields.php3: Use $encoded_key instead of $key to

View File

@@ -136,17 +136,7 @@ else {
// garvin: Get, if sent, any protected fields to insert them here:
if (isset($fields_type) && is_array($fields_type) && isset($primary_key)) {
reset($fields_type);
$protected_stack = array();
while (list($key, $val) = each($fields_type)) {
if ($val == 'protected') {
$protected_stack[] = PMA_backquote(urldecode($key));
}
}
reset($fields_type);
$prot_local_query = 'SELECT ' . implode(', ', $protected_stack) . ' FROM ' . PMA_backquote($table) . ' WHERE ' . urldecode($primary_key);
$prot_local_query = 'SELECT * FROM ' . PMA_backquote($table) . ' WHERE ' . urldecode($primary_key);
$prot_result = PMA_mysql_query($prot_local_query) or PMA_mysqlDie('', $prot_local_query, '', $err_url);
$prot_row = PMA_mysql_fetch_array($prot_result);
}