사용자가 특정 전투기의 성을 입력하여 결과를받을 수 있지만 전투기의 이름을 입력 할 수있는 쿼리를 변경하려고합니다. 이 작업을 수행하려면 아래 쿼리를 어떻게 변경해야합니까? 여기 SQL에서 WHERE 문을 수정하려면 어떻게합니까?
코드입니다 :SELECT distinct
'${searchT}' searchalp,
(SELECT COUNT(fighterId) FROM tblFighter where fighter_lastName like '${searchT}%') totalresults,
A.FighterID,
A.Fighter_FirstName,
A.Fighter_NickName,
if (A.Fighter_Height > 0,
CONCAT(FLOOR(A.Fighter_Height/12), '\' ', MOD(A.Fighter_Height,12), '"'), '') Fighter_Height_inch,
A.Fighter_NormalWeight,
if (A.Fighter_Reach > 0, CONCAT(ROUND(A.Fighter_Reach,0), '"') , '') Fighter_Reach,
A.Fighter_Stance,
CONCAT('/fighter/',REPLACE(REPLACE(LCASE(A.Fighter_FirstName),' ','-'),'.',''),'/',REPLACE(LCASE(A.Fighter_LastName),' ','-'),'/',A.FighterID,'/') fighterURL,
(select count(*) from tblFight_Fighter where FighterID = A.FighterID and OutcomeID = 1) fighterCareerWins, (select count(*) from tblFight_Fighter where FighterID = A.FighterID and OutcomeID = 2) fighterCareerLosses, (select count(*) from tblFight_Fighter where FighterID = A.FighterID and OutcomeID = 3) fighterCareerDraws,
fighter_lastName, FA.AccoladeDescription FROM tblFighter as A LEFT JOIN (SELECT FighterId, AccoladeDescription, AccoladeType
FROM tblAccolade
JOIN tblEvent USING(EventID)
JOIN (SELECT AccoladeID, Max(Event_Date) as MaxAccDate
FROM tblAccolade
JOIN tblEvent ON tblAccolade.EventID = tblEvent.EventID
WHERE AccoladeType = 'Belt' AND AccoladeDescription not like 'WEC%'
GROUP BY AccoladeID) as tmpMaxAccDate ON tblAccolade.AccoladeID = tmpMaxAccDate.AccoladeID
WHERE Event_Date = MaxAccDate) as FA ON FA.FighterId = A.FighterId and FA.AccoladeType = 'Belt' where A.fighter_lastName like '${searchT}%' order by A.fighter_lastName ASC LIMIT ${stInd}, ${lstInd}
'impute' - 무언가 정직하지 못한 행위 (특히 형사 범죄)에 대한 진술. '입력 '을 의미 했습니까? – mellamokb