gpt4 book ai didi

php - Mysql 内连接在 Mysql 5.1 上不起作用

转载 作者:行者123 更新时间:2023-11-29 23:25:19 24 4
gpt4 key购买 nike

它在我的本地服务器(MySql 5.5)上正常工作,但在远程服务器(MySql 5.1)上不起作用

$dati = mysql_query(" 
SELECT *
FROM $tb_liguria
JOIN $tb_piemonte ON $tb_piemonte.piemonte_data = $tb_liguria.liguria_data
JOIN $tb_paca ON $tb_paca.paca_data = $tb_liguria.liguria_data
JOIN $tb_rhonealpes ON $tb_rhonealpes.rhonealpes_data = $tb_liguria.liguria_data
WHERE $tb_liguria.liguria_data >= '$dataInizio' and $tb_liguria.liguria_data <= '$dataFine'
ORDER BY $tb_liguria.liguria_data
");

我也尝试过,但没有任何改变

$dati = mysql_query(" 
SELECT *
FROM $tb_liguria
JOIN ($tb_piemonte, $tb_paca, $tb_rhonealpes)
ON ($tb_liguria.liguria_data=$tb_piemonte.piemonte_data AND $tb_liguria.liguria_data=$tb_paca.paca_data AND $tb_liguria.liguria_data=$tb_rhonealpes.rhonealpes_data)
WHERE ($tb_liguria.liguria_data >= '$dataInizio' AND $tb_liguria.liguria_data <= '$dataFine')
ORDER BY $tb_liguria.liguria_data
");

最佳答案

解决了!

在查询之前添加此内容:

$setupMySql = mysql_query(" SET OPTION SQL_BIG_SELECTS = 1 " ) or die(mysql_error());

关于php - Mysql 内连接在 Mysql 5.1 上不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27017578/

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