how can i insert a column with an ascending number for each row of my table?
Forums
CC6: Insert Column with numered list
Hi, you could use the primary key column in your database that you should have. Then, with Read Data function order that column Ascending.
Regards,
Elita
Regards,
Elita
Thank you for reply but i can't use this solution because i have a list of reservations for estabilished days.
For example:
day: 25th september
Reservation for play tennis.
On 26th september I cancel reservation and I insert other data and i want a numbered list in the new data, and so on
For example:
day: 25th september
Reservation for play tennis.
On 26th september I cancel reservation and I insert other data and i want a numbered list in the new data, and so on
i think that i can do it if i insert this mysql command :
SET @num := 0;
UPDATE `TABLE` SET id = @num := (@num+1);
ALTER TABLE `TABLE` AUTO_INCREMENT =1;
but i don't know where i can insert this code in CF8 when i create a new reservation.
SET @num := 0;
UPDATE `TABLE` SET id = @num := (@num+1);
ALTER TABLE `TABLE` AUTO_INCREMENT =1;
but i don't know where i can insert this code in CF8 when i create a new reservation.
You need to login to be able to post a reply.