MYSQL 将两列与一列连接并获取数据
固定的!抱歉浪费了大家的时间 :P
我试图在 PHP 中使用 mysql 将两列与一列连接起来
$result = $link->query('选择软件。*, 流派.Naam AS 流派, Console.Naam AS ConsoleNaam, Draager.Naam AS MediumNaam, 工作室.Naam AS StudioNaam, Publisher.Naam AS PublisherNaam 来自软件 INNER JOIN 流派 ON Genre.Genre_ID = Software.Genre_ID INNER JOIN Console ON Console.Console_ID = Software.Console_ID 内部连接 Draager ON Draager.Draager_ID = Software.Medium_ID INNER JOIN 公司 AS Studio ON Software.Studio_ID = Studio.Company_ID INNER JOIN 公司 AS 发布者 ON Software.Publisher_ID = Publisher.Company_ID ');
Table Company 必须在 ID 上与 Table Software 合作才能获得 公司名称。
关于我必须对上面的脚本进行哪些更改才能实现的任何提示 工作?
FIXED! sorry to waste anyones time :P
im trying to get two colums joined with one with mysql in PHP
$result = $link->query('SELECT Software.*, Genre.Naam AS Genre, Console.Naam AS ConsoleNaam, Draager.Naam AS MediumNaam, Studio.Naam AS StudioNaam, Publisher.Naam AS PublisherNaam FROM Software INNER JOIN Genre ON Genre.Genre_ID = Software.Genre_ID INNER JOIN Console ON Console.Console_ID = Software.Console_ID INNER JOIN Draager ON Draager.Draager_ID = Software.Medium_ID INNER JOIN Company AS Studio ON Software.Studio_ID = Studio.Company_ID INNER JOIN Company AS Publisher ON Software.Publisher_ID = Publisher.Company_ID ');
Table Company has to join with Table Software on there ID's to get the
name of the Company.Any tips on what i have to change to the script above to get it to
work?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
只是为了得到一个答案:
关联表时 JION 拼写为 JOIN :D
Just to have an answer:
JION is spelled JOIN when relating tables :D
你有一个错字。
JOIN
拼写错误为JION
:You have a typo.
JOIN
misspelled asJION
: