mysql phpMyAdmin表搜索返回空结果,但SQL选择适用于特定表

64jmpszr  于 2024-01-05  发布在  Mysql
关注(0)|答案(4)|浏览(179)

这是非常奇怪的是发生了什么,我从来没有见过这之前,我很熟悉mysql。
当使用phpMyAdmin表搜索功能搜索表时,无论我输入什么,结果都是空的。例如,在ID列中搜索77返回空结果。但是,如果我也在phpMyAdmin中运行SQL查询,然后就会有结果。例如,select * from table 1 where id = '77';
更奇怪的是,这只发生在一个表上,所有其他表的搜索功能都工作正常。
我试着修复表,但仍然出现空结果。
我在网上找不到任何人发生这种事......
重新启动SQL Server。

rta7y2nd

rta7y2nd1#

你是否使用cPanel -如果是,我只是描述了如何解决cPanel论坛上的问题:
http://forums.cpanel.net/f5/unable-use-phpmyadmin-search-users-table-313381.html

u4dcyp6a

u4dcyp6a2#

如果你的表有大量的字段,通过phpMyAdmin接口的更新可能会超过PHP设置'max_input_vars'的值。当这种情况发生时,phpMyAdmin期望在页面上接收到的一些内部表单字段被截断,这会导致phpMyAdmin失败,不幸的是,没有提示,页面重定向到空白搜索表单,没有任何警告。“max_input_vars”的默认值是1000。我在php.ini文件中将我的值提高到5000,没有任何负面影响,它为我解决了这个问题。
设置'max_input_vars'有一个PHP_INI_PERVISION模式,所以如果你不能访问你的php.ini文件,那么你可以在一个.htaccess文件中设置它,你的httpd.conf文件或你的.user.ini(从PHP 5.3开始)文件,如果你有一个。我不知道你需要什么代码来创建一个htaccess文件,但下面的PHP代码可以做到这一点。

  1. ini_set('max_input_vars', '5000');

字符串
希望这能让你朝着正确的方向开始。

ix0qys7i

ix0qys7i3#

非常简单。进入表格,并显示最大行数,如图所示。然后你就可以搜索每一个大页面。它不会通过所有表格获取文本。它只播放表格的一页。

jchrr9hc

jchrr9hc4#

我使用了以下方法,它解决了我的问题。

  1. <?php
  2. ini_set('display_errors', 1);
  3. ini_set('error_reporting', E_ALL);
  4. if ($_SERVER["REQUEST_METHOD"] == "POST") {
  5. $namespace = $_POST["namespace"];
  6. if (isset($_POST['generatepod-graph'])) {
  7. if (!empty($namespace)) {
  8. $command = "/scripts/telemetry/resource/namespace-pod-cpu-usage.sh " . escapeshellcmd($namespace);
  9. $output = shell_exec($command);
  10. $plotlypodHtml = file_get_contents('/var/www/html/Telemetry/pod-resource/cpu_usage_chart.html');
  11. if ($plotlypodHtml !== false) {
  12. session_start();
  13. $_SESSION['plotlypodHtml'] = $plotlypodHtml;
  14. header("Location: /Telemetry/pod-resource/display_poresourcegraph.php");
  15. exit();
  16. } else {
  17. echo "Failed to load graph data.";
  18. }
  19. }
  20. }
  21. if (isset($_POST['generatemem-graph'])) {
  22. if (!empty($namespace)) {
  23. $command = "/scripts/telemetry/resource/namespace-pod-memory-usage.sh " . escapeshellcmd($namespace);
  24. $output = shell_exec($command);
  25. $plotlypodHtml = file_get_contents('/var/www/html/Telemetry/pod-resource/memory_usage_chart.html');
  26. if ($plotlypodHtml !== false) {
  27. session_start();
  28. $_SESSION['plotlypodHtml'] = $plotlypodHtml;
  29. header("Location: /Telemetry/pod-resource/display_memresourcegraph.php");
  30. exit();
  31. } else {
  32. echo "Failed to load graph data.";
  33. }
  34. }
  35. }
  36. }
  37. include 'pod-resource.html';
  38. ?>

字符串

展开查看全部

相关问题