added database name to relation querys

This commit is contained in:
Sebastian Mendel
2005-12-17 17:36:58 +00:00
parent d1b9d33269
commit 16a71a194e
11 changed files with 186 additions and 143 deletions

View File

@@ -328,8 +328,10 @@ if ($cfgRelation['pdfwork'] && $num_tables > 0) { ?>
<?php
// We only show this if we find something in the new pdf_pages table
$test_query = 'SELECT * FROM ' . PMA_backquote($cfgRelation['pdf_pages'])
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'';
$test_query = '
SELECT *
FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['pdf_pages']) . '
WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'';
$test_rs = PMA_query_as_cu($test_query, NULL, PMA_DBI_QUERY_STORE);
if ($test_rs && PMA_DBI_num_rows($test_rs) > 0) { ?>