php phpMyAdmin:更改显示的默认行数?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1413288/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-25 02:27:30  来源:igfitidea点击:

phpMyAdmin: change default number of rows displayed?

phpmysqlphpmyadmin

提问by Nathan Long

By default, phpMyAdmin shows me 30 rows whenever I load a table (the query contains "LIMIT 30"). I generally want to see (up to) a few hundred rows.

默认情况下,每当我加载表时,phpMyAdmin 都会向我显示 30 行(查询包含“LIMIT 30”)。我通常希望看到(最多)几百行。

Is there a way to change that default setting?

有没有办法更改该默认设置?

回答by BraedenP

In your phpMyAdmin directory, there will be a file called "config.inc.php".

在您的 phpMyAdmin 目录中,会有一个名为“config.inc.php”的文件。

Find the line where it sets the MaxRows value:

找到设置 MaxRows 值的行:

$cfg['MaxRows'] = 1000;

And change the value to whatever you want.

并将值更改为您想要的任何值。

回答by Rick

Using phpMyAdmin version 3.4 and above you are able to change the default rows shown by:

使用 phpMyAdmin 3.4 及更高版本,您可以更改显示的默认行:

On the phpMyAdmin home screen click Settings>> Main frame>> Browse modeand altering the value within Maximum number of rows to display.

在 phpMyAdmin 主屏幕上单击Settings>> Main frame>>Browse mode并更改Maximum number of rows to display.

回答by Alain

I have no access to config.inc.php

我无权访问 config.inc.php

To show more records I add to my query:

要显示我添加到查询中的更多记录:

LIMIT 0,1000;

LIMIT 0,1000;

to show 1,000 records, from 0 to 1000.

显示 1,000 条记录,从 0 到 1000。

You can change 1000 to any number according to your needs.

您可以根据需要将 1000 更改为任意数字。

One example:

一个例子:

SELECT id, folio, sucursal
FROM equipos
WHERE sucursal = 3
ORDER BY folio
LIMIT 0,1000;

Greetings from Mexico!

来自墨西哥的问候!

回答by gopal sharma

Already Checked..... Simple Steps Follow:-

已经检查..... 简单的步骤如下:-

  1. Go PhpAdmin
  2. Select Your Table
  3. In Your table there is a field name Show, Which is actually a Button. Here two boxes present like(Start row(0) Number of Rows(1000) Header every(100)). ----
  4. Press on Show button.
  1. 转到 PHP 管理员
  2. 选择您的餐桌
  3. 在你的表中有一个字段名称显示,它实际上是一个按钮。这里有两个框,如(Start row(0) Number of Rows(1000) Header every(100))。----
  4. 按显示按钮。

回答by Muhammad Salem

  1. Find the file config.inc.php in your phpmyadmin directory

  2. Edit it in any text editor

  3. look for the line which contains the word $cfg['MaxRows']
  4. if it has value like this ($cfg['MaxRows'] = 30;) just edit the number (30) to the number of rows you like -- if that line doesn't exist just Add it at the end of the file before the ?>tag as follow:
  1. 在 phpmyadmin 目录中找到文件 config.inc.php

  2. 在任何文本编辑器中编辑它

  3. 查找包含单词的行 $cfg['MaxRows']
  4. 如果它具有这样的值 ( $cfg['MaxRows'] = 30;),只需将数字 (30) 编辑为您喜欢的行数——如果该行不存在,只需将其添加到文件末尾的?>标记前,如下所示:

As shown in the picture

如图所示

......

$cfg['MySQLManualBase'] = 'http://dev.mysql.com/doc/refman/5.1/en';
$cfg['MySQLManualType'] = 'searchable';

$cfg['MaxRows'] = 1000;

?>

回答by Magnum

If you don't have access to the installation files, you should use Ricks answer with "click Settings>> Main frame>> Browse modeand altering the value within Maximum number of rows to display", but it can be that this does not take effect for other users. If so, you can:

如果您无权访问安装文件,则应使用 Ricks 回答“单击Settings>> Main frame>>Browse mode并更改其中的值Maximum number of rows to display”,但这可能对其他用户无效。如果是这样,您可以:



  • login as root
  • choose database phpmyadmin
  • select table pma_userconfig
  • search for the user in question (field username)
  • edit the field config_databy adding e.g. "MaxRows":1000to the contents in brackets, e.g. results in {"MaxRows":1000,"lang":"de"}
  • 以 root 身份登录
  • 选择数据库 phpmyadmin
  • 选择表 pma_userconfig
  • 搜索有问题的用户(字段username
  • config_data通过将例如添加"MaxRows":1000到括号中的内容来编辑该字段,例如导致{"MaxRows":1000,"lang":"de"}


Hope that helps.

希望有帮助。

回答by user2664108

just add the line : $cfg['MaxRows'] = 300; to /etc/phpmyadmin/config.inc.php (ubuntu)

只需添加行: $cfg['MaxRows'] = 300; 到 /etc/phpmyadmin/config.inc.php (ubuntu)

回答by Eimantas

phpMyAdmin has a config file called config.inc.php. You should be able to find appropriate setting in there.

phpMyAdmin 有一个名为 config.inc.php 的配置文件。您应该能够在那里找到合适的设置。

回答by Clinton

The answers that refer to updating the MaxRows value in config.inc.php are correct, however, they fail to mention that this setting may be missing from config.inc.php.

提到更新 config.inc.php 中 MaxRows 值的答案是正确的,但是,他们没有提到 config.inc.php 中可能缺少此设置。

The more complete procedure is as follows:

比较完整的流程如下:

  1. Find the file config.inc.php in your phpMyAdmin directory and open this in an editor
  2. Look for the line that starts with $cfg['MaxRows']
  3. If it is commented out, remove the '//' in front of the $cfg...
  4. If the line is not present (it is missing in the default installation) then go to the bottom of the document and add the row

    $cfg['MaxRows'] = 50;

  5. You can set the value for the 'MaxRows' attribute can be set to any one of the following: 25, 50, 100, 250, 500

  6. Save the document and restart
  1. 在 phpMyAdmin 目录中找到文件 config.inc.php 并在编辑器中打开它
  2. 查找以 $cfg['MaxRows'] 开头的行
  3. 如果被注释掉了,去掉$cfg前面的'//'...
  4. 如果该行不存在(默认安装中缺少该行),则转到文档底部并添加该行

    $cfg['MaxRows'] = 50;

  5. 您可以设置 'MaxRows' 属性的值可以设置为以下任意一项:25、50、100、250、500

  6. 保存文档并重新启动

Notice that there is a file called config.sample.inc.php in the phpMyAdmin directory. If you open this, you will see a list of possible settings (and some explanations) that you can add to your config.inc.php file to further configure phpMyAdmin.

请注意,phpMyAdmin 目录中有一个名为 config.sample.inc.php 的文件。如果您打开它,您将看到一个可能的设置列表(和一些解释),您可以将其添加到 config.inc.php 文件中以进一步配置 phpMyAdmin。

I hope that this helps.

我希望这个对你有用。