bug #1103289 bookmark problem with mysqli, and typo
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$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>
|
2005-01-20 Michael Keck <mkkeck@users.sourceforge.net>
|
||||||
* themes/.../theme_right.css.php: new class for disabled (not available)
|
* themes/.../theme_right.css.php: new class for disabled (not available)
|
||||||
text / values / messages
|
text / values / messages
|
||||||
|
@@ -57,7 +57,7 @@ function PMA_listBookmarks($db, $cfgBookmark)
|
|||||||
. ' OR user = \'\')';
|
. ' OR user = \'\')';
|
||||||
$result = PMA_DBI_query($query, $dbh, PMA_DBI_QUERY_STORE);
|
$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) {
|
if ($result > 0 && PMA_DBI_num_rows($result) > 0) {
|
||||||
$flag = 1;
|
$flag = 1;
|
||||||
while ($row = PMA_DBI_fetch_row($result)) {
|
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)
|
function &PMA_queryDBBookmarks($db, $cfgBookmark, &$table_array)
|
||||||
{
|
{
|
||||||
global $dbh;
|
global $dbh;
|
||||||
|
$bookmarks = array();
|
||||||
$boommarks = array();
|
|
||||||
|
|
||||||
if (empty($cfgBookmark['db']) || empty($cfgBookmark['table'])) {
|
if (empty($cfgBookmark['db']) || empty($cfgBookmark['table'])) {
|
||||||
return $bookmarks;
|
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'])
|
$query = 'SELECT label, query FROM ' . PMA_backquote($cfgBookmark['db']) . '.' . PMA_backquote($cfgBookmark['table'])
|
||||||
. ' WHERE dbase = \'' . PMA_sqlAddslashes($db) . '\''
|
. ' WHERE dbase = \'' . PMA_sqlAddslashes($db) . '\''
|
||||||
. (count($search_for) > 0 ? ' AND label IN (' . implode(', ', $search_for) . ')' : '');
|
. (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;
|
if (!$result || PMA_DBI_num_rows($result) < 1) return $bookmarks;
|
||||||
while ($row = PMA_DBI_fetch_assoc($result)) {
|
while ($row = PMA_DBI_fetch_assoc($result)) {
|
||||||
$bookmarks[$row['label']] = $row['query'];
|
$bookmarks[$row['label']] = $row['query'];
|
||||||
|
Reference in New Issue
Block a user