bug #1674972 no export with %afm%

This commit is contained in:
Sebastian Mendel
2007-03-15 17:15:59 +00:00
parent cf6de45646
commit d4164091ff
3 changed files with 23 additions and 17 deletions

View File

@@ -15,6 +15,7 @@ $HeadURL$
- bug #1666657 Cookie password delete on timeout / inactivity
- bug #1648802 different mysql library and server version
- bug #1239401 table dot numeric field name
- bug #1674972 no export with %afm%
- [gui] avoid displaying a wide selector in server selection
+ [core] added PMA_fatalError() and made use of it
. [i18n] use generic $strOptions

View File

@@ -39,16 +39,21 @@ if (isset($sql_query)) {
$sql_query .= ' FROM ' . $analyzed_sql[0]['from_clause'];
}
if (isset($primary_key) && is_array($primary_key)) {
$sql_query .= ' WHERE ';
$conj = '';
foreach ($primary_key AS $i => $key) {
$sql_query .= $conj . '( ' . $key . ' ) ';
$conj = 'OR ';
$wheres = array();
if (isset($primary_key) && is_array($primary_key)
&& count($primary_key) > 0) {
$wheres[] = '(' . implode(') OR (',$primary_key) . ')';
}
} elseif (!empty($analyzed_sql[0]['where_clause'])) {
$sql_query .= ' WHERE ' . $analyzed_sql[0]['where_clause'];
if (!empty($analyzed_sql[0]['where_clause'])) {
$wheres[] = $analyzed_sql[0]['where_clause'];
}
if (count($wheres) > 0 ) {
$sql_query .= ' WHERE (' . implode(') AND (', $wheres) . ')';
}
if (!empty($analyzed_sql[0]['group_by_clause'])) {
$sql_query .= ' GROUP BY ' . $analyzed_sql[0]['group_by_clause'];
}

View File

@@ -91,7 +91,7 @@ if (!empty($submit_mult)) {
$single_table = TRUE;
$primary_key = array();
$sql_query = urldecode($sql_query);
//$sql_query = urldecode($sql_query);
// garvin: As we got the fields to be edited from the 'rows_to_delete' checkbox, we use the index of it as the
// indicating primary key. Then we built the array which is used for the tbl_change.php script.
foreach ($rows_to_delete AS $i_primary_key => $del_query) {