bug #1103289 bookmark problem with mysqli, and typo

This commit is contained in:
Marc Delisle
2005-01-22 13:56:27 +00:00
parent 992cff7db7
commit 279898e7bd
2 changed files with 7 additions and 4 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
$Id$
$Source$
2005-01-22 Marc Delisle <lem9@users.sourceforge.net>
* libraries/bookmark.lib.php: bug #1103289: num_rows and MYSQL_USE_RESULT,
and fix a typo "boommark"
2005-01-20 Michael Keck <mkkeck@users.sourceforge.net>
* themes/.../theme_right.css.php: new class for disabled (not available)
text / values / messages

View File

@@ -57,7 +57,7 @@ function PMA_listBookmarks($db, $cfgBookmark)
. ' OR user = \'\')';
$result = PMA_DBI_query($query, $dbh, PMA_DBI_QUERY_STORE);
// There is some bookmarks -> store them
// There are some bookmarks -> store them
if ($result > 0 && PMA_DBI_num_rows($result) > 0) {
$flag = 1;
while ($row = PMA_DBI_fetch_row($result)) {
@@ -125,8 +125,7 @@ function PMA_queryBookmarks($db, $cfgBookmark, $id, $id_field = 'id', $action_bo
function &PMA_queryDBBookmarks($db, $cfgBookmark, &$table_array)
{
global $dbh;
$boommarks = array();
$bookmarks = array();
if (empty($cfgBookmark['db']) || empty($cfgBookmark['table'])) {
return $bookmarks;
@@ -140,7 +139,7 @@ function &PMA_queryDBBookmarks($db, $cfgBookmark, &$table_array)
$query = 'SELECT label, query FROM ' . PMA_backquote($cfgBookmark['db']) . '.' . PMA_backquote($cfgBookmark['table'])
. ' WHERE dbase = \'' . PMA_sqlAddslashes($db) . '\''
. (count($search_for) > 0 ? ' AND label IN (' . implode(', ', $search_for) . ')' : '');
$result = PMA_DBI_try_query($query, $dbh);
$result = PMA_DBI_try_query($query, $dbh, PMA_DBI_QUERY_STORE);
if (!$result || PMA_DBI_num_rows($result) < 1) return $bookmarks;
while ($row = PMA_DBI_fetch_assoc($result)) {
$bookmarks[$row['label']] = $row['query'];