SELECT `a`.`MaterialNum`,`a`.`PicName`,`a`.`PartName`,`a`.`StepID`,`b`.`StepName`,`b`.`StepTime`,`b`.`UnitPrice`,`b`.`Quota` from ty_process as `a`,ty_partstep as `b`WHERE `a`.`PicName`=`b`.`PicName` and `a`.`PicName` like 'FDH-2101%' and `b`.`StepID` like concat(`a`.`StepID`,'%') 这个sql中`b`.`StepID` like concat(`a`.`StepID`,'%') 有问题,`a`.`StepID`取不到值,应该是符号的问题,试了半天都不行,引号,双引号都试过了放到 phpmyadmin 里运行看看 不行啊,我把concat(`a`.`StepID`,'%')改成concat(`1`,'%')就行了,我是在PHP页面中写的 用AS 试试. 不行啊, 哥们,试下这个. SELECT a.MaterialNum,a.PicName,a.PartName,a.StepID,b.StepName,b.StepTime,b.UnitPrice,b.Quota from ty_process as a,ty_partstep as bWHERE a.PicName=b.PicName and a.PicName like 'FDH-2101%' and b.StepID like concat(a.StepID,'%') 不要符号 不行 什么意思? SELECT `a`.`MaterialNum`,`a`.`PicName`,`a`.`PartName`,`a`.`StepID`,`b`.`StepName`,`b`.`StepTime`,`b`.`UnitPrice`,`b`.`Quota` from ty_process as `a`,ty_partstep as `b`WHERE `a`.`PicName`=`b`.`PicName` and `a`.`PicName` like 'FDH-2101%' and `b`.`St