Do not generate search query to include all fields, just SELECT * is enough.

This commit is contained in:
Michal Čihař
2004-05-11 09:45:13 +00:00
parent fe962c55fc
commit d2b2e1eae3
2 changed files with 3 additions and 2 deletions

View File

@@ -8,6 +8,8 @@ $Source$
2004-05-11 Michal Čihař <michal@cihar.com>
* libraries/sqlparser.lib.php: Modified pretty printer to display nicer
queries generated by our db search.
* db_search.php: Do not generate search query to include all fields, just
SELECT * is enough.
2004-05-10 Marc Delisle <lem9@users.sourceforge.net>
* lang/serbian: Updated, thanks to Mihailo Stefanovic (mikis).

View File

@@ -63,7 +63,6 @@ if (isset($submit_search)) {
} // while
PMA_DBI_free_result($res);
unset($current, $res);
$sqlstr_fieldstoselect = ' ' . implode(', ', $tblfields);
$tblfields_cnt = count($tblfields);
// Table to use
@@ -102,7 +101,7 @@ if (isset($submit_search)) {
unset($fieldslikevalues);
// Builds complete queries
$sql['select_fields'] = $sqlstr_select . $sqlstr_fieldstoselect . $sqlstr_from . $sqlstr_where;
$sql['select_fields'] = $sqlstr_select . ' * ' . $sqlstr_from . $sqlstr_where;
$sql['select_count'] = $sqlstr_select . ' COUNT(*) AS count' . $sqlstr_from . $sqlstr_where;
$sql['delete'] = $sqlstr_delete . $sqlstr_from . $sqlstr_where;