- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用 MySQLi Procedural 从 MYSQL 数据库运行查询。我只看到这是如何使用 MySQLi 面向对象代码完成的。
它在本地主机上完美运行,但在远程服务器上我收到一条错误消息,指出我有超过 MAX_JOIN_SIZE 行。我应该使用什么代码来修复此错误?
我已经查看了与此错误相关的所有页面,尽管我知道问题是什么,但我不知道如何修复它。我见过的所有示例都使用 MySQLi 面向对象代码。我尝试过限制(LIMIT 30)返回的记录数量,但这没有什么区别。
<?php
$con=mysqli_connect("localhost","******","******","ps10");
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$query_rs4 = "SELECT * FROM student_data INNER JOIN users ON student_data.class = users.class INNER JOIN ext_writing_tbl ON student_data.id = ext_writing_tbl.id";
$rs4 = mysqli_query($con, $query_rs4)or die( mysqli_error($con) );
$row = mysqli_num_rows($rs4);
echo "There are " . $row . " students in this class";
?>
这是完整的错误消息。
The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay.
它应该输出到表格。
最佳答案
我现在确信这是在服务器上设置的并且超出了我的控制范围。那么如何编写一个不使用三个表的查询(使用 INNER JOIN 两次)?
关于mysql - 如何修复 "The SELECT would examine more than MAX_JOIN_SIZE rows"问题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56360954/
我正在为我本地的足球队制作一个网站,我想在一个页面上显示每个团队成员的一些简单数据(场上位置、比赛次数、进球数等)。我尝试通过对数据库的一次查询来选择所有需要的数据,因为我了解到最大限度地减少网络调用
我有两张 table 。一个是记录调用的调用历史表(开始时间、结束时间、电话号码、用户等)。另一个是记录订单详细信息(订单号、客户信息、订单日期等)的订单表。创建调用时并不总是创建订单,因此没有保证的
我代表遇到此问题的一小部分用户问这个问题。 一旦他们使用的脚本获得第 21 个 ID,就会生成以下错误: The SELECT would examine more than MAX_JOIN_SIZ
我运行此查询: SELECT u.user_id, u.fname, u.lname, n.title, n.news_id, n.post, n.zip, z.city,z.state_abbr F
我们正在连接 3 个表,分别包含约 21000 行、约 2000 行和约 1600 行。 MAX_JOIN_SIZE 约为 8.000.000。每个表都包含一个名为providerID 的列。 查询如
当运行一个连接来自 3 个大表的数据的查询时,我收到一条错误消息 The SELECT would examine more than MAX_JOIN_SIZE rows; check you
我开发了一个考勤管理系统,我想通过运行以下查询来生成报告,这将是大量的行,我在共享主机上并收到以下错误: 查询: SELECT `attendance`.*, `users`.`id` AS use
我有一个 SQL 查询失败(大部分时间),因为连接的行太多。 MySQL 提供的错误是 The SELECT would examine more than MAX_JOIN_SIZE rows;检查
我正在使用 PHP 和 MySQL。在我的程序中有一个涉及连接的选择查询。当我在本地主机上运行它时它工作正常但是当我将它上传到我的服务器并尝试执行它时它会生成以下错误: SELECT 将检查超过 MA
有 max_join_size = 300M 的 MariaDB 10.4.14 和里面有大约 150,000 条记录的硬币 InnoDB 表。 一个足够简单的查询会产生 MAX_JOIN_SIZE
当我将 cakephp v3 应用程序部署到共享主机时,出现以下 MAX_JOIN_SIZE 错误: Error: SQLSTATE[42000]: Syntax error or acces
我正在使用 MySQLi Procedural 从 MYSQL 数据库运行查询。我只看到这是如何使用 MySQLi 面向对象代码完成的。 它在本地主机上完美运行,但在远程服务器上我收到一条错误消息,指
我有一个小型非营利组织的捐助者和门票销售信息数据库。我正在尝试根据捐赠、购买季票或购买单程票的人快速导出邮件列表。 “entity”表是联系信息等,然后其他表包含有关捐赠的信息(年份、金额、支票日期等
我的查询遇到了问题...... SELECT keywords.keyword, keywords.keyid, sources.s_title, sources.s_disc, sources.s_
Exception -> string(69) "SQLSTATE[HY000]: General error: 1193 Unknown system variable 'OPTION'" Exce
我是一名优秀的程序员,十分优秀!