gpt4 book ai didi

php - MYSQL查询后跳过列的获取

转载 作者:太空宇宙 更新时间:2023-11-03 12:13:39 25 4
gpt4 key购买 nike

我需要在 mysql 中运行查询并以某种方式显示输出,但是查询是由第三方提供的,我无法更改它们。一个例子是:

SELECT j.`First Name`, j.`Last Name`, c .*
FROM PersonalInfo j
INNER JOIN
Evaluations c
ON j.UIN = c.UIN

其中表 PersonalInfo 包含人们的个人信息,而表 Evaluations 存储人们的评价。 Evaluations 表包含 blob 字段,其中存储了评估的(有时很重)pdf。

此查询的问题在于,由于评估具有 blob 字段,并且这些字段是在 SELECT 语句中选择的,所以我别无选择,只能在执行 $result->fetch_assoc() 时读取这些字段,如下所示

if ($result = $mysqli->query($DTIS->query)){
while ($row = $result->fetch_assoc()) {
// at this point I believe the (heavy) blob info has been fetched and put into $row["blobfield"] right ?
// if field is blob display just a link, otherwise the info.
}
}

有没有一种方法可以跳过特定列的获取,这样我就可以快速显示表格而无需阅读任何繁重的 blob 信息?请记住,我无法更改查询字符串。任何代码模板也很受欢迎。

感谢您的帮助。

最佳答案

如果查询由第三方提供且您无法更改它们 - 否。

关于php - MYSQL查询后跳过列的获取,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23134930/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com