select children into childNodes from location_structure limit 1;
SET @phCount = 0;
SET @sqlPhCount = CONCAT('SELECT count(*) INTO @phCount FROM location_photo WHERE LocationID in (',childNodes,')');
PREPARE phCount FROM @sqlPhCount;
EXECUTE phCount;
DEALLOCATE PREPARE phCount;
动态执行这个SQL语句后,@phCount的值仍然是0,使用语句去查询表是有值的。