我不确定这是不合法的,但我认为这样做没有害处 . 该网站未得到积极维护 . 我曾尝试联系该网站的所有者,但没有任何回复 .
该网站有一个API,用于通过 www.website.com/api/Query
在JSON中向公众提供数据 . 我定期使用api收集数据(显示前几周的数据) . 最近,我在加载网站时收到一条错误消息,该网站几乎显示了用于加载数据的查询 .
像这样的东西:
{"code":101,
"status":"failure",
"message":"CDbCommand failed to execute the SQL statement:
SQLSTATE[HY000]: General error: 2013 Lost connection to MySQL server /
during query. The SQL statement executed was:
SELECT * FROM table
WHERE created_date >= DATE_SUB(
(select MAX(created_date)
from table), INTERVAL 1 WEEK)"
}
CDbCommand failed to execute the SQL statement:
SQLSTATE[HY000]: General error: 2006 MySQL server has gone away./
The SQL statement executed was:
SELECT `id`
FROM `YiiSession`
WHERE id=:id
问题解决了,但让我想知道我是否可以从网站访问历史数据 . 虽然我对网站的工作方式有基本的了解,但我不知道如何解决这个问题 . 任何帮助表示赞赏 .