Generate better query for multi row export.
This commit is contained in:
@@ -19,6 +19,7 @@ $Source$
|
|||||||
* lang/czech: Fixed untranslated word (translation #952551).
|
* lang/czech: Fixed untranslated word (translation #952551).
|
||||||
* scripts/create_tables.sql: Cleaned up description, regenerated dump.
|
* scripts/create_tables.sql: Cleaned up description, regenerated dump.
|
||||||
* tbl_row_delete.php: Highlight correct tab for multi row editing/export.
|
* tbl_row_delete.php: Highlight correct tab for multi row editing/export.
|
||||||
|
* tbl_properties_export.php: Generate better query for multi row export.
|
||||||
|
|
||||||
2004-05-12 Marc Delisle <lem9@users.sourceforge.net>
|
2004-05-12 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* db_details_structure.php: bug #951143, undefined $header_url_qry
|
* db_details_structure.php: bug #951143, undefined $header_url_qry
|
||||||
|
@@ -38,23 +38,15 @@ if (isset($sql_query)) {
|
|||||||
if (!empty($analyzed_sql[0]['from_clause'])) {
|
if (!empty($analyzed_sql[0]['from_clause'])) {
|
||||||
$sql_query .= ' FROM ' . $analyzed_sql[0]['from_clause'];
|
$sql_query .= ' FROM ' . $analyzed_sql[0]['from_clause'];
|
||||||
}
|
}
|
||||||
if (!empty($analyzed_sql[0]['where_clause'])) {
|
|
||||||
$sql_query .= ' WHERE ' . $analyzed_sql[0]['where_clause'];
|
|
||||||
}
|
|
||||||
if (isset($primary_key)) {
|
if (isset($primary_key)) {
|
||||||
if (empty($analyzed_sql[0]['where_clause'])) {
|
$sql_query .= ' WHERE ';
|
||||||
$sql_query .= ' WHERE ';
|
|
||||||
} else {
|
|
||||||
$sql_query .= ' AND ( ';
|
|
||||||
}
|
|
||||||
$conj = '';
|
$conj = '';
|
||||||
foreach($primary_key AS $i => $key) {
|
foreach($primary_key AS $i => $key) {
|
||||||
$sql_query .= $conj . '( ' . $key . ' ) ';
|
$sql_query .= $conj . '( ' . $key . ' ) ';
|
||||||
$conj = 'OR ';
|
$conj = 'OR ';
|
||||||
}
|
}
|
||||||
if (!empty($analyzed_sql[0]['where_clause'])) {
|
} else {
|
||||||
$sql_query .= ' ) ';
|
$sql_query .= ' WHERE ' . $analyzed_sql[0]['where_clause'];
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (!empty($analyzed_sql[0]['group_by_clause'])) {
|
if (!empty($analyzed_sql[0]['group_by_clause'])) {
|
||||||
$sql_query .= ' GROUP BY ' . $analyzed_sql[0]['group_by_clause'];
|
$sql_query .= ' GROUP BY ' . $analyzed_sql[0]['group_by_clause'];
|
||||||
|
Reference in New Issue
Block a user