About the $I PP operation of while?

what I do when I generate an order is:

while ($row = mysqli....) {
$id = substr(date("YmdHi", time()), -10);
}

because there will be dozens of orders in one second
, but this will lead to the same order number
. I have thought about using "uniqid" or some other way, but what I want to do now is

.

assuming that the number of while has 5
, it can be added to the number using $iPP. For example,
18113019151
18113019152
18113019153
18113019154
18113019155

anyway, it starts at 1 and ends with while.
it"s just that I try to do this:

$i = 1;
while ($row = mysqli....) {
$id = substr(date("YmdHi", time()), -10).$i;
$iPP;
}

but there are no numbers, is it impossible to do so? How can that be achieved?

Feb.11,2022

in this way, it is possible

$i = 0;
while (.... {

$iPP;
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b31918-40de7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b31918-40de7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?