*注意,如果您能想到一个更具建设性的标题,请进行编辑。
我有一个看起来像这样的表:
id | forGame | otherType | otherName | otherDesc
9 |+Stellar+Dawn |Character |Car |Car
10 |+Stellar+Dawn |Item |Brugson Burson |a guy
11 |+Stellar+Dawn |Item |Space Pie |A pie from space
现在,我的问题是我试图将多个查询分成一个:
$gameOther_typeItem = $database->queryDB("SELECT * FROM `mainSite_others` WHERE otherType='Item' AND forGame='$gameName'");
$gameOther_typeEntity = $database->queryDB("SELECT * FROM `mainSite_others` WHERE otherType='Entity' AND forGame='$gameName'");
$gameOther_typeCharacter = $database->queryDB("SELECT * FROM `mainSite_others` WHERE otherType='Character' AND forGame='$gameName'");
(不用担心 $database->... 部分,这是我的课。)
我如何将这些合二为一?
谢谢你。