diff options
author | Marc Delisle <marc@infomarc.info> | 2009-12-30 18:27:27 +0300 |
---|---|---|
committer | Marc Delisle <marc@infomarc.info> | 2009-12-30 18:27:27 +0300 |
commit | 87b994743bb8553161699d4ff7845a59da758a60 (patch) | |
tree | 540ab878dde6008deab98c24a0638a09af25776f /tbl_export.php | |
parent | d63ed916fc1fb91adbf158e61297376b0f98477c (diff) |
primary_key is really a WHERE clause (that works also on tables where no PK is defined)
Diffstat (limited to 'tbl_export.php')
-rw-r--r-- | tbl_export.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tbl_export.php b/tbl_export.php index ed13551cf7..11df4b6f1b 100644 --- a/tbl_export.php +++ b/tbl_export.php @@ -31,8 +31,8 @@ if (! empty($sql_query)) { $analyzed_sql = PMA_SQP_analyze($parsed_sql); // Need to generate WHERE clause? - if (isset($primary_key)) { - // Yes => rebuild query from scracts, this doesn't work with nested + if (isset($where_clause)) { + // Yes => rebuild query from scratch; this doesn't work with nested // selects :-( $sql_query = 'SELECT '; @@ -48,9 +48,9 @@ if (! empty($sql_query)) { $wheres = array(); - if (isset($primary_key) && is_array($primary_key) - && count($primary_key) > 0) { - $wheres[] = '(' . implode(') OR (',$primary_key) . ')'; + if (isset($where_clause) && is_array($where_clause) + && count($where_clause) > 0) { + $wheres[] = '(' . implode(') OR (',$where_clause) . ')'; } if (!empty($analyzed_sql[0]['where_clause'])) { |