我尝试使用里程表进行奖励投票,现在我希望我的号码轮询是零, 1,239,387 001,239,387 , 它从123456789开始。当里程表运行时,结果没有00,只有 1,239,387 。 这个代码我尝试使用concat或添加前缀来添加前导零。但如果带有> 0显示
<?php
$query="SELECT
CONCAT('00',MBR_ID) AS MBR_ID,
NAME,
RWD_DESC
FROM RTL.RWD_POLL RWD
JOIN RTL.RWD_HEAD HED ON RWD.RWD_HEAD_NBR = HED.RWD_HEAD_NBR
WHERE HED.ACT_F = 1 AND RWD.DEL_NBR = 0
ORDER BY RWD_POLL_NBR DESC";
$result = mysql_query($query);
$row = mysql_fetch_array($result);
$MbrN = $row['MBR_ID'];
$names = $row['NAME'];
$reward = $row['RWD_DESC'];
//$NoUndian = sprintf('%02d',$MbrN);
?>
<script>
setTimeout(function(){
$('.odometer').html(<?php echo $NoUndian; ?> );
}, 1000);
</script>
结果仍然是1,239,387,没有零。