PHP / SQL - PHP不会输出sql查询 [英] PHP/SQL - PHP won't output sql query

查看:125
本文介绍了PHP / SQL - PHP不会输出sql查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你能帮我吗?只是试图填写一些文本,因为stackoverflow想要写更多文本,因为它是所有代码

解决方案

此字段上的别名

  SELECT f.roundID as froundID 

然后用单引号不加倍

  $ row ['froundID'] 

和更大的问题是SQL QUERY

  FROM fixtures AS f 
INNER JOIN团队AS h
ON f.homeTeam = h.teamID
AND f.awayTeam = h.teamID

不会返回任何东西,因为离开团队和hometeam应该是连续的一样...


$ b要纠正的$ b

应该是OR,它可以是家庭团队或者远程团队

  FROM fixtures AS f 
INNER JOIN团队AS h
ON(f.homeTeam = h.teamID
OR f.awayTeam = h.teamID)

您需要创建3个que的更新要求r





- 获得


2 - 获得团队

3 - 获取场地


could you please help me? just trying to fill in some text as stackoverflow wants to write more text because it's all code

解决方案

alias on this field

SELECT f.roundID as froundID

then use single quotes not double

$row['froundID']

AND THE BIGGER PROBLEM IS THE SQL QUERY

FROM fixtures AS f
INNER JOIN team AS h
  ON f.homeTeam = h.teamID
  AND f.awayTeam = h.teamID

which will not return anything because the awayteam and hometeam should be the same in a row...

to correct should be OR where it can be either the hometeam or awayteam

FROM fixtures AS f
INNER JOIN team AS h
  ON (f.homeTeam = h.teamID
  OR f.awayTeam = h.teamID)

with the updated requirement you need to create 3 queries
where
1 - get the rounds
2 - get the teams
3 - get the venue

这篇关于PHP / SQL - PHP不会输出sql查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆